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

fahad

03/24/2023, 8:37 PM
Hi all! Has anyone ever found a pattern for creating an op that can take in any arbitrary
AssetKey
via op configuration?
dagster bot responded by community 1
My workaround has been to include the s3 location in the output metadata of the upstream SDA and use UPath configuration to allow consumer of the op to pass in an s3 key, but it would be nice to avoid the indirection and directly reference the asset key
l

Leo Qin

03/24/2023, 8:53 PM
could do something like this:
asset_key = AssetKey(context.op_config["asset"])
👀 1
f

fahad

03/24/2023, 8:55 PM
Ah yeah! And I could just re-use the io manager
load_input
definition to turn that into the actual dataset. I think that should totally work
Thanks for the tip!
🌈 1
2 Views