Stephen Lloyd
04/10/2023, 9:22 AMDbtCoreOperation
we are receiving the following error...
This suggests that our dbt cli profile block, which we have defined in dbt Cloud, does not have a name or target or target_configs, but it does..
pydantic.error_wrappers.ValidationError: 3 validation errors for DbtCoreOperation
dbt_cli_profile -> name
field required (type=value_error.missing)
dbt_cli_profile -> target
field required (type=value_error.missing)
dbt_cli_profile -> target_configs
field required (type=value_error.missing)
I was able to use the profile_dir
parameter to use my local credentials, but this only verifies there aren't obvious problems with the flow code.
prefect-dbt==0.3.1
prefect-snowflake==0.26.0
Any ideas?snowflake_connector = await SnowflakeConnector.load("snowflake-connector")
target_configs = SnowflakeTargetConfigs(connector=snowflake_connector)
dbt_cli_profile = DbtCliProfile(
name="jaffle_shop",
target="dev",
target_configs=target_configs,
)
profile = dbt_cli_profile.get_profile()
dbt_init = DbtCoreOperation(
commands=["dbt debug", "dbt list"],
dbt_cli_profile=dbt_cli_profile,
overwrite_profiles=True
)
dbt_init.run()
Specifically profile = dbt_cli_profile.get_profile()
is wrong.
DbtCoreOperation uses get_profile()
internally, so we shouldn't use it before passing the profile in.
cc: @Susan Joshi
@Emil Christensen I'm sending a support email to ask for a fix, but where would I do this without the support email.Rob Freedy
04/10/2023, 1:29 PMSean Williams
04/10/2023, 11:35 PMStephen Lloyd
04/11/2023, 6:23 AMStephen Lloyd
04/12/2023, 5:00 AM