Hello! I'm trying to run a fairly simple dbt task ...
# prefect-server
Hello! I'm trying to run a fairly simple dbt task but getting this error:
Copy code
Task 'DbtShellTask': Starting task run...
[2021-07-06 15:05:27-0400] ERROR - prefect.DbtShellTask | Command failed with exit code 2
[2021-07-06 15:05:27-0400] INFO - prefect.TaskRunner | FAIL signal raised: FAIL('Command failed with exit code 2')
[2021-07-06 15:05:28-0400] INFO - prefect.TaskRunner | Task 'DbtShellTask': Finished task run for task with final state: 'Failed'
[2021-07-06 15:05:28-0400] INFO - prefect.FlowRunner | Flow run FAILED: some reference tasks failed.
it's pretty vague, is there a way to get more details? and does anyone know what an exit code of 2 means?
Exit code 2 is generally a permissions error
If you toggle
on the DbtShellTask you should get the last line of output
Thanks! Looks like it's saying I'm not in a dbt directory even though I specified it here:
Copy code
Copy code
fatal: Not a dbt project (or any of the parent directories). Missing dbt_project.yml file
You probably need a “helper” command to “cd” into you dbt directory, the one with the dbt_project.yml — a good way to test the whole thing is by issuing a “dbt debug” command
that worked, thanks!