Yang
11/02/2022, 6:44 PM@graph
def my_graph(fiscal_year):
pillar = compute_pillar("esg", fiscal_year)
alex
11/02/2022, 6:48 PM@graph
def my_graph(fiscal_year, some_param="esg"):
pillar = compute_pillar(some_param, fiscal_year)
Yang
11/02/2022, 7:12 PMAssetDefinitions.from_graph
? Or do I need to explicitly make the input optional?
dagster._core.errors.DagsterInvalidDefinitionError: Input asset '["pillar_name"]' for asset '["esg_scores"]' is not produced by any of the provided asset ops and is not one of the provided sources
alex
11/03/2022, 2:15 PMbc I’m using AssetDefinitions.from_graphI think so - you may be able to work around it by nesting the graph again, though thats cumbersome
Yang
11/03/2022, 5:17 PMins
to the decorator?alex
11/03/2022, 5:33 PMYang
11/03/2022, 5:42 PM@graph
def esg_scores(pillar_name:str="esg"):
...
return pillar_scores
and the job like this
@job(resource_defs=r_defs, executor_def=esg_executor)
def esg_scores_op_job():
esg_scores()
and in the launchpad, it says Missing required config entry "inputs"
alex
11/03/2022, 5:57 PMinput_values
on to_job
/ @job
- maybe that would work for you
from dagster import graph, job, op
@op
def echo(x):
return x
@graph
def test_g(y):
echo(y)
print(test_g.execute_in_process(input_values={"y": 4}).success)
@job(input_values={"z": 4})
def test_j(z):
test_g(z)
print(test_j.execute_in_process().success)
Yang
11/03/2022, 6:40 PMdefine_asset_job
? I'd need to make pillar_name
a SourceAsset?