refactor to allow for multiple code locations

This commit is contained in:
2025-07-20 19:49:30 +02:00
parent 9b8cfabee5
commit fd73e1367c
40 changed files with 161 additions and 628 deletions

34
apps/test/test.py Normal file
View File

@@ -0,0 +1,34 @@
import time
from dagster import AssetMaterialization, Output, config_mapping, job, op
@op(config_schema={"config_param": str})
def hello(context):
time.sleep(1)
print("halllo")
return Output(123, metadata={"aa": context.op_config["config_param"]})
@op
def goodbye(context, x: int):
time.sleep(2)
print("doooei", x)
context.log_event(
AssetMaterialization(
asset_key="my_asset",
metadata={"my_meta": 444},
description="A very useful value!",
)
)
return 2
@config_mapping(config_schema={"simplified_param": str})
def simplified_config(val):
return {"ops": {"hello": {"config": {"config_param": val["simplified_param"]}}}}
@job
def my_job():
goodbye(hello())