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

Aaron T

03/22/2023, 2:53 AM
Trying to run a partitioned
@graph_asset
and add the
OpExecutionContext
to the input, however, when I try this -
def my_report_graph(context: OpExecutionContext) -> Output[pd.DataFrame]
I get an error -
DagsterInvalidDefinitionError: "context" is not a valid name in Dagster. It conflicts with a Dagster or python reserved keyword.
Does anyone have an idea why I might be getting this error? It works fine if it is a regular asset, and not a graph_asset
j

jamie

03/22/2023, 2:33 PM
hey @Aaron T the context is not provided to graphs or graph_assets by dagster. We only construct and pass
context
to ops and assets. So you would have something like this instead
Copy code
@op
def op_1(context):
   ...

@op
def op_2(context):
   ...

@graph_asset 
def my_graph_asset():
    op_1()
    op_2()
4 Views