Nikolaj Galak
02/16/2023, 7:25 PMrex
02/16/2023, 7:28 PMrex
02/16/2023, 7:29 PMkwargs
that can be used to override the default parameters of the resource.rex
02/16/2023, 7:31 PM@op(required_resource_keys={"dbt})
def my_dbt_op(context):
context.dbt.cli("run", vars=get_dbt_vars(context.run_id))
Nikolaj Galak
02/16/2023, 8:20 PMload_assets_from_dbt_project()
afterwards materialization is triggered by freshness sensor, so I have no explicit declaration of assets and opsNikolaj Galak
02/16/2023, 8:26 PMcustom_dbt_cli_resource(context)
which is exact copy of dbt_cli_resource
with additional call to vars = get_dbt_vars(context.run_id)
since context is available when resource is initialized. It is not pretty solution, thus looking for better wayrex
02/16/2023, 8:34 PMop
would require altering the existing interface for load_assets_from_dbt_project
to accept some sort of mapping function from context
to your desired kwargs
, which also doesn’t seem prettyNikolaj Galak
02/16/2023, 9:56 PM