When using the `@asset` decorator, the name of the...
# ask-community
c
When using the
@asset
decorator, the name of the asset definition is, by default, the
AssetKey
?
j
yes, that’s correct, and you can also specify it speparately if you want. For example
Copy code
@asset(
   key_prefix=["prefix_1", "prefix_2"]
)
def my_asset():
    ....
will create an asset with the name/AssetKey of
["prefix_1", "prefix_2", "my_asset"]
and
Copy code
@asset(
   key_prefix=["prefix_1", "prefix_2"],
   name="my_custom_name"
)
def my_asset():
    ....
will create an asset with the name/AssetKey of
["prefix_1", "prefix_2", "my_custom_name"]