How can I get the `AssetKey` from an `AssetDefini...
# ask-community
g
How can I get the
AssetKey
from an
AssetDefinition
? Currently I use:
my_asset.op.name
but are not certain that the name of the
op
equals the asset key.
s
I've got an in-progress PR that adds an
asset_key
property. Until that lands, you can do this somewhat verbose thing:
next(iter(my_asset.asset_keys))
g
cool - can you link it so I can track when it gets merged?
s
yeah - it's part of a bigger PR, but I could break it out into a smaller PR if it's urgent: https://github.com/dagster-io/dagster/pull/7395
g
no I think this is not neccessary - at least for me.