app.datafold.com
, set the custom domain as the variable:
manifest.json
files to represent the production and staging versions of your dbt project.
Please see our detailed docs on how to set up Datafold in CI for dbt Core, and reach out to our team if you have questions.
dbt run
or dbt build
command will be compared.
dbt_project.yml
prod_custom_schema:
will vary based on how you have setup dbt.
This variable is used when a model has a custom schema and becomes dynamic when the string literal <custom_schema>
is present. The <custom_schema>
substring is replaced with the custom schema for the model in order to support the various ways schema name generation can be overridden here — also referred to as “advanced custom schemas”.
Examples (not exhaustive)
Single production schema
If your prod environment looks like this …
manifest.json
using --state
--state
option is highly recommended for dbt projects with multiple target database and schema configurations. For example, if you customized the generate_schema_name
macro, this is the best option for you.
Note:dbt ls
is preferred overdbt compile
as it runs faster and data diffing does not require fully compiled models to work.
Options | Description |
---|---|
--version | Print version info and exit. |
-w, --where EXPR | An additional ‘where’ expression to restrict the search space. Beware of SQL Injection! |
--dbt-profiles-dir PATH | Which directory to look in for the profiles.yml file. If not set, we follow the default profiles.yml location for the dbt version being used. Can also be set via the DBT_PROFILES_DIR environment variable. |
--dbt-project-dir PATH | Which directory to look in for the dbt_project.yml file. Default is the current working directory and its parents. |
--select SELECTION or MODEL_NAME | Select dbt resources to compare using dbt selection syntax in dbt versions >= 1.5. In versions < 1.5, it will naively search for a model with MODEL_NAME as the name. |
--state PATH | Specify manifest to utilize for ‘prod’ comparison paths instead of using configuration. |
-pd, --prod-database TEXT | Override the dbt production database configuration within dbt_project.yml . |
-ps, --prod-schema TEXT | Override the dbt production schema configuration within dbt_project.yml . |
--help | Show this message and exit. |