Sean Quinlan
07/21/2023, 7:39 PMto_source_asset()
to satisfy an op
input but loading the Definitions
throws:
FAILED tests/test_graph_with_source_asset.py::test_dependency - dagster._core.errors.DagsterInvalidDefinitionError: Input 'emails' of op 'send_emails_with_footer' has no way of being resolved. Must provide a resolution to this input via another op/graph, or via a d...
Here's a simple repro: https://gist.github.com/sbquinlan/001006e9a601a838e55870e394b14e7eclaire
07/21/2023, 11:34 PM@asset
def pending_email():
...
@op
def mailing_list() -> str:
return "<mailto:foo@bar.com|foo@bar.com>"
@op
def send_emails_with_footer(
to: str,
emails,
) -> str:
...
@graph_asset
def send_emails_graph(pending_email) -> str:
return send_emails_with_footer(to=mailing_list(), emails=pending_email)
and it looks like it's executing properly now. My guess is that the behavior you observed is probably an oddity related to an upstream asset not being passed as an input to the graph assetclaire
07/21/2023, 11:34 PMSean Quinlan
07/21/2023, 11:46 PM@graph_asset
works if you don't use Definitions
and just call send_emails_graph.<http://node_def.to|node_def.to>_job()
the AssetLayer
is constructed completely differently in the GraphDefinition
instead of the Definitions
callSean Quinlan
07/21/2023, 11:54 PM