Michael Wedekindt
06/09/2021, 4:26 PMwith Flow(name="dbt_flow") as f:
task = DbtShellTask(
log_stderr=True,
log_stdout=True,
return_all=True,
stream_output=True,
profiles_dir=profile_path
)(command='dbt run --models data_hub')
out = f.run()
I got this error message back
[2021-06-09 16:06:15+0200] INFO - prefect.FlowRunner | Beginning Flow run for 'dbt_flow'
[2021-06-09 16:06:15+0200] INFO - prefect.TaskRunner | Task 'DbtShellTask': Starting task run...
[2021-06-09 16:06:15+0200] INFO - prefect.DbtShellTask | /bin/bash: C:\Users\M7856~1.\AppData\Local\Temp\prefect-5yoqhqg_: No such file or directory
[2021-06-09 16:06:15+0200] ERROR - prefect.DbtShellTask | Command failed with exit code 127
[2021-06-09 16:06:15+0200] INFO - prefect.TaskRunner | FAIL signal raised: FAIL('Command failed with exit code 127')
[2021-06-09 16:06:15+0200] INFO - prefect.TaskRunner | Task 'DbtShellTask': Finished task run for task with final state: 'Failed'
[2021-06-09 16:06:15+0200] INFO - prefect.FlowRunner | Flow run FAILED: some reference tasks failed.
When I try this with the common ShellTask I get the same error.
Here some background facts:
I already added bash to path and I can open a bash console
I use Visual Studio Code for developing
My Python Version is 3.9.5
My prefect Version is 0.14.21
Usually I run my dbt locally in the Ubuntu Subsystem on Windows but could run dbt in windows cmd as well
Thanks in advance for help and best regards, MichaelZach Schumacher
06/09/2021, 4:33 PMdef __init__(
self,
command: str = None,
env: dict = None,
helper_script: str = None,
shell: str = "bash",
return_all: bool = False,
log_stderr: bool = False,
stream_output: Union[bool, int, str] = False,
**kwargs: Any,
)
Michael Wedekindt
06/09/2021, 4:42 PMshell = 'cmd'
but then Its waiting for input from my site, but I cant exec anything instead dir
then it lists folder content and exit. are there more options?Kevin Kho
Michael Wedekindt
06/09/2021, 4:57 PMshell="powershell"
then I get this messages
[2021-06-09 18:55:12+0200] INFO - prefect.FlowRunner | Beginning Flow run for 'dbt_flow'
[2021-06-09 18:55:13+0200] INFO - prefect.TaskRunner | Task 'DbtShellTask': Starting task run...
[2021-06-09 18:55:13+0200] INFO - prefect.TaskRunner | Task 'DbtShellTask': Finished task run for task with final state: 'Success'
[2021-06-09 18:55:13+0200] INFO - prefect.FlowRunner | Flow run SUCCESS: all reference tasks succeeded
But I dont see if he has executed dbt or at least try to executeZach Schumacher
06/09/2021, 5:20 PMKevin Kho
Michael Wedekindt
06/15/2021, 3:28 PMKevin Kho