Hey folks :slightly_smiling_face: Is there a way ...
# ask-community
a
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
Since tasks don't directly return state objects unless they're using signals, this isn't currently possible from within a task definition itself.
What custom info are you trying to pass? Why the reluctance to use signals?
a
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
If you're returning all the stdout from the shell task, then wouldn't that info already be available in the state handler?
a
Didn't think about this, let me try 🙂