dbt

My Note

  • Running based on model name
bash
dbt run –models modelname # will only run modelname
dbt run –models +modelname # will run modelname and all parents
dbt run –models modelname+ # will run modelname and all children
dbt run –models +modelname+ # will run modelname, and all parents and children
dbt run –models @modelname # will run modelname, all parents, all children, and all parents of all children
dbt run –exclude modelname # will run all models except modelname
  • Running based on folder name
bash
dbt run –models folder # will run all models in a folder
dbt run –models folder. subfolder # will run all models in the subfolder
dbt run –models +folder. subfolder # will run all models in the subfolder and all parents
dbt run –models folder.subfolder+ # will run all models in the subfolder and all children
dbt run –models +folder.subfolder+ # will run all models in the subfolder, all parents, all children
dbt run –models @folder.subfolder # will run all models in the subfolder, all parents, all children, AND all parents of all children
dbt run –exclude folder # will run all models except the folder
  • Running based on tag
bash
dbt run –models tag:tagname # will run only tagged models.
dbt run –models +tag:tagname # will run tagged models and all parents.
dbt run –models tag:tagname+ # will run tagged models and all children.
dbt run –models +tag:tagname+ # will run tagged models and all parents and children.
dbt run –models @tag:tagname # will run tagged, all parents, all children, AND all parents of all children.
dbt run –exclude tag:tagname # will run all models except the tagged models
  • Multiple model inputs
bash
dbt run –models modelname+ folder @tag:tagname modelname # like this any number of models can be specified.