Andrew Maturo
09/03/2024, 4:34 PMdbt task failed with exception: No such command 'run --no-write-json --select test'.
And the logs show:
Running dbt command: ['run --no-write-json --select test', '--profiles-dir', '/root/.dbt', '--project-dir', PosixPath('models')]
which is odd. It appears to somehow be stripping out the 'dbt' of the command despite my code having:
def _dbt_run_and_test(model: str, upstream: list = None) -> str:
dbt_profile = dbt_cli_profile
cmd_run = f"dbt run --no-write-json --select {model}"
cmd_test = f"dbt test --no-write-json --select {model}"
I've traced everything through trigger_dbt_cli_command
but still can't find out how a word is being dropped.
Second, with prefect_dbt_flow, I can't figure out how to pass a DbtCliProfile instead of a DbtProfile when creating a dbt_flow. I'm guessing the package just can't take in the cli object and is only written for the yaml. Is there a way to convert the cli profile to a yaml?Sean Williams
09/04/2024, 2:33 PMSean Williams
09/04/2024, 2:34 PM--no-write-json
. If you remove that, does it work for you? Also, what version of prefect-dbt are you using?Andrew Maturo
09/04/2024, 3:49 PMAndrew Maturo
09/04/2024, 3:50 PMAndrew Maturo
09/04/2024, 3:50 PMSean Williams
09/04/2024, 3:57 PMAndrew Maturo
09/04/2024, 4:27 PMAndrew Maturo
09/04/2024, 6:49 PM