Thomas Haederle
03/26/2023, 3:32 PMFrederik Löw
03/27/2023, 6:13 AM@asset(group_name="context")
def test_context(context:OpExecutionContext):
<http://context.log.info|context.log.info>("test")
pass
sean
03/27/2023, 4:54 PM@asset
def some_asset(context):
return 1
some_asset()
If you are, it’s complaining because no context is provided-- when your asset runs as part of a job, Dagster has a defined context that it injects, but that context doesn’t exist for direct invocation, so you have to create one using `build_op_context`: https://docs.dagster.io/_apidocs/execution#dagster.build_op_context