https://dagster.io/ logo
#ask-community
Title
# ask-community
q

Qwame

08/31/2022, 5:17 PM
My op calls a function. How can I pass context to this inner function?
j

jamie

08/31/2022, 7:38 PM
Hi @Qwame do you have a code snippet of something you've tried that isn't working? the following code snippet should work, but i'm curious to know if that's not the case for you
Copy code
def some_func(context):
    print(context)

@op 
def my_op(context):
    some_func(context)
q

Qwame

09/01/2022, 1:55 AM
Thanks @jamie this is what I had. I was wondering if there was a dagster preferred way to achieve this.
j

jamie

09/01/2022, 12:35 PM
nope! this is what we recommend!
5 Views