실행에서 모델 제외

실행에서 모델 제외 (Exclude models from your run)

--exclude 플래그는 --select와 같은 의미를 가지며, --select로 선택한 모델 집합에서 제거할 모델을 지정해요. 이름이나 계보(lineage)로 특정 리소스를 제외하는 방법을 다뤄요.

출처: 문서

본문

모델 제외하기 (Excluding models)

dbt는 --select와 같은 의미를 가진 --exclude 플래그를 제공해요. --exclude 플래그에 지정된 모델은 --select로 선택된 모델 집합에서 제거돼요.

dbt run --select "my_package".*+ --exclude "my_package.a_big_model+"
    # select all models in my_package and their children except a_big_model and its children

특정 리소스를 이름이나 계보로 제외:

# test
dbt test --exclude "not_null_orders_order_id"   # test all models except the not_null_orders_order_id test
dbt test --exclude "orders"                     # test all models except tests associated with the orders model
# seed
dbt seed --exclude "account_parent_mappings"    # load all seeds except account_parent_mappings
# snapshot
dbt snapshot --exclude "snap_order_statuses"    # execute all snapshots except snap_order_statuses

더 알아보기 (Learn more)