Gatsby Lee
07/18/2022, 6:10 PMjamie
07/18/2022, 6:23 PMGatsby Lee
07/18/2022, 6:24 PMowen
07/18/2022, 6:32 PMGatsby Lee
07/18/2022, 6:33 PMGatsby Lee
07/18/2022, 6:33 PMGatsby Lee
07/18/2022, 6:33 PMowen
07/18/2022, 6:34 PMdbt_deps_op
pretty easily in that case. that would look something like
@op(required_resource_keys={'dbt'})
def dbt_deps_op(context):
context.resources.dbt.deps()
owen
07/18/2022, 6:35 PM@job
def deps_and_run_job():
dbt_run_op(start_after=dbt_deps_op())
Gatsby Lee
07/18/2022, 6:36 PMowen
07/18/2022, 6:36 PMGatsby Lee
07/18/2022, 6:39 PMGatsby Lee
07/18/2022, 6:42 PMrequired_resource_keys={'dbt'})
?Gatsby Lee
07/18/2022, 6:43 PMdbt_resource_all_models = dbt_cli_resource.configured(
{
"project_dir": "../dbt_data_tf",
"profiles_dir": "../dbt_data_tf",
}
)
Gatsby Lee
07/18/2022, 6:43 PMowen
07/18/2022, 6:45 PMresource_defs={"dbt": dbt_resource_all_models, ...}
), both the dbt deps op and the dbt run op will use that same resourceGatsby Lee
07/18/2022, 6:46 PMGatsby Lee
07/18/2022, 6:46 PMGatsby Lee
07/18/2022, 8:58 PMdeps
doesn’t exist.Gatsby Lee
07/18/2022, 9:02 PMAttributeError: 'DbtCliResource' object has no attribute 'deps'
owen
07/18/2022, 9:02 PMcontext.resources.dbt.execute_cli("deps")
insteadGatsby Lee
07/18/2022, 9:03 PMGatsby Lee
07/18/2022, 9:03 PMGatsby Lee
07/18/2022, 10:15 PMexecute_cli
also doesn’t exist.
AttributeError: 'DbtCliResource' object has no attribute 'execute_cli'
Gatsby Lee
07/18/2022, 10:15 PMGatsby Lee
07/18/2022, 10:15 PMGatsby Lee
07/18/2022, 10:15 PMowen
07/18/2022, 10:15 PMcli
(sorry again) and I'll grab the api docs for youowen
07/18/2022, 10:16 PMGatsby Lee
07/18/2022, 10:16 PMGatsby Lee
07/18/2022, 10:16 PMGatsby Lee
07/18/2022, 10:16 PMowen
07/18/2022, 10:16 PMGatsby Lee
07/18/2022, 10:17 PMRobert Lawson
11/09/2022, 2:27 PMRobert Lawson
11/09/2022, 2:27 PM