Hey folks 🙂
Is there a way to enrich a task state with additional variables?
I know this can be done when using signals, but I would like to add some custom variables to a task state even without using signals.
The main reason for doing this is to consume the variables in state handlers
j
Jim Crist-Harif
03/10/2021, 10:19 PM
Since tasks don't directly return state objects unless they're using signals, this isn't currently possible from within a task definition itself.
Jim Crist-Harif
03/10/2021, 10:20 PM
What custom info are you trying to pass? Why the reluctance to use signals?
a
ale
03/10/2021, 10:27 PM
I'm trying to attach dbt logs returned from DbtShellTask.
I'd like to have them in the state object so I can use them in a state handler and send them to Slack
j
Jim Crist-Harif
03/10/2021, 10:32 PM
If you're returning all the stdout from the shell task, then wouldn't that info already be available in the state handler?