Skip to content

How to get run_config of the last run from a context of @dagster.asset_sensor? #17615

Answered by sryza
hdao3363 asked this question in Q&A
Discussion options

You must be logged in to vote

Here's an example:

@asset_sensor(asset_key=AssetKey("my_table"), job=my_job)
def my_asset_sensor(context: SensorEvaluationContext, asset_event: EventLogEntry):
    run_id = asset_event.run_id
    run = instance.get_run_by_id(run_id)
    run_config = run.run_config

Relevant: #14139

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hdao3363
Comment options

Answer selected by sryza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants