Alexander Eric Wijaya
01/10/2023, 5:55 AMAdam Bloom
01/10/2023, 2:22 PMdbt run
, including the full refresh flag.
context.resources.dbt.run(
select=context.op_config["select"],
exclude=context.op_config["exclude"],
vars=context.op_config["vars"],
full_refresh=context.op_config["full_refresh"],
)
sandy
01/10/2023, 4:45 PMowen
01/10/2023, 4:47 PMdbt_cli_resource
can be configured with {..., "full_refresh": True}
Alexander Eric Wijaya
01/11/2023, 3:30 AMowen
01/11/2023, 3:08 PMdbt_cli_resource
configurable:
@configured(dbt_cli_resource, config_schema={"full_refresh": Field(bool, default_value=False)})
def custom_dbt_cli_resource(config):
return {
"full_refresh": config["full_refresh"],
"project-dir": DBT_PROJECT_DIR,
"profiles-dir": DBT_PROFILES_DIR
}
from there, in the UI, you can kick off a run with extra config by shift+clicking the "materialize" button (so you'd select the models you want to full refresh, then shift+click the button). then you can add config to that run that would look like
resources:
dbt:
config:
full_refresh: True
Alexander Eric Wijaya
01/12/2023, 2:29 AMowen
01/12/2023, 3:11 AMAlexander Eric Wijaya
01/13/2023, 4:21 AM