Make runtime output metadata available to downstream ops
See original GitHub issueRequests for this:
- https://github.com/dagster-io/dagster/discussions/6913
- https://dagster.slack.com/archives/C01U954MEER/p1655806363783739
- https://dagster.slack.com/archives/C01U954MEER/p1655606789374799
- https://dagster.slack.com/archives/C01U954MEER/p1660902824466749
- https://dagster.slack.com/archives/C02NA9CUPU0/p1661200431642469
Workaround for now, if you’re using software-defined assets and you want to access it in the IO manager:
def handle_output(self, context):
context.add_output_metadata({"foo": "bar"})
def load_input(self, context):
asset_key = context.asset_key
event_log_entry = context.step_context.instance.get_latest_materialization_event(asset_key)
metadata = event_log_entry.dagster_event.event_specific_data.materialization.metadata
foo_value = metadata["foo"].value
assert foo_entry.text == "bar"
Workaround for now, if you’re using software-defined assets and you want to access it in the downstream asset body:
@asset(non_argument_deps={AssetKey("some_upstream_asset")})
def downstream_asset(context):
event_log_entry = context.instance.get_latest_materialization_event(AssetKey("some_upstream_asset"))
metadata = event_log_entry.dagster_event.event_specific_data.materialization.metadata
foo_value = metadata["foo"].value
assert foo_entry.text == "bar"
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Make runtime output metadata available to downstream ops ...
An orchestration platform for the development, production, and observation of data assets. - Make runtime output metadata available to downstream ops ...
Read more >IO Managers - Dagster Docs
IOManagers are user-provided objects that are responsible for storing the output of an asset or op and loading it as input to downstream...
Read more >Delta Live Tables concepts | Databricks on AWS
You can publish your tables to make them available for discovery and querying by downstream consumers. Pipeline updates. After you create the ...
Read more >Troubleshoot Azure Stream Analytics outputs - Microsoft Learn
This article describes techniques to troubleshoot your output connections in Azure Stream Analytics jobs.
Read more >MetaData in the DeepStream SDK
It is still available in the Gst Buffer. New metadata fields¶. The NvDsObjectMeta structure from DeepStream 5.0 GA release has three bbox info ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you want to figure out the latest materialization event for a particular partition key:
So you want
add_input_metadata
duringload_input
and then access it within@asset
?You should be able to do something like