ale
09/02/2022, 11:17 AMprefect-shell one, or should I stark from scratch?
If I extend prefect-shell , should I create my own task and use the shell_run_command inside my task?
Quick example:
from prefect_shell import shell_run_command
@task
def my_shell_task(command: str):
return shell_run_command(command=command)
Would this work if I call my_shell_task in a flow?alex
09/02/2022, 12:01 PMshell_run_command inside tasks in your new collection. That's what we did for the dbt CLI commands in prefect-dbt. You can use the functionality of shell_run_command in another task by calling shell_run_command.fn().ale
09/06/2022, 2:42 PM.fn() approach.
I’m a bit confused now 😅alex
09/06/2022, 2:47 PM.fn(), but if you’re calling .fn() within a task, then you’ll get orchestration observability for that task. .fn() is an advanced feature and acts as an escape hatch in scenarios like this, so it shouldn’t be the first thing that you reach for.ale
09/06/2022, 3:46 PM