Open briankski opened 1 month ago
Thanks for raising this issue @briankski! We've added this issue to our backlog and will start working on it shortly!
has this been fixed in a new version? When I logged this I was on prefect==2.19.1
& prefect-dbt==0.5.0
First check
Bug summary
Can't run the dbt source freshness command within a prefect task/flow https://docs.getdbt.com/reference/commands/source Using either the
trigger_dbt_cli_command
orDbtCoreOperation
fails when trying to run the source freshness.Using the
trigger_dbt_cli_command
is caused by the ordering of the cli args when building the command https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-dbt/prefect_dbt/cli/commands.py#L160-L169 results with the command beingNo matter what style you use each one results in
source freshness command
not found ordbt.cli.exceptions.DbtUsageException: No such option: --profiles-dir
trigger_dbt_cli_command(command="source", extra_command_args=["freshness"])
trigger_dbt_cli_command(command="source freshness"])
When using
DbtCoreOperation
the command actually runs sucessfully but when its finished prefect still throws an error and marks the task as failed. See the error stack trace below for that example.Reproduction
Error
Versions
Additional context
No response