https://dagster.io/ logo
#ask-community
Title
# ask-community
g

Grigoriy Sterin

05/24/2022, 4:38 PM
Hi All. Is there a way to access event metadata of the AssetMaterialization event inside of the
asset_sensor
? I tried doing this, but it didn't work (dagster_event doesn't have
metadata
field):
Copy code
@asset_sensor(asset_key=AssetKey("my-asset-key"), job=my_job)
def my_asset_sensor(context, asset_event):
    yield RunRequest(
        run_key=context.cursor,
        run_config={
            "ops": {
                "my_op": {
                    "config": {
                        "txt_metadata_from_asset": asset_event.dagster_event.metadata["txt_field"]
                    }
                }
            }
        }
    )
👀 1
🤖 1
a

assaf

05/25/2022, 11:58 AM
I was looking for the same information, and searching Slack for
asset_event
I found some existing threads on this topic. I hope it helps you, @Grigoriy Sterin. 🙏
g

Grigoriy Sterin

05/25/2022, 3:02 PM
Thank you!
s

sean

05/25/2022, 3:21 PM
Just a note that this is on our radar and we are already tracking it here: https://github.com/dagster-io/dagster/issues/7384