Slackbot
03/05/2024, 1:24 PMScout
03/05/2024, 1:24 PMkey
parameter of the @asset
decorator. The asset key is an instance of AssetKey
, which is a sequence of strings that uniquely identifies an asset within your Dagster instance. Here's an example from the documentation on how to specify an asset key: python from dagster import asset, AssetKey @asset(key=AssetKey(["my_asset_group", "my_asset_name"])) def my_asset(): # Your asset computation logic here ...
In this example, the asset key is specified as AssetKey(["my_asset_group", "my_asset_name"])
, which creates a hierarchical structure for the asset within the asset catalog. This can be useful for organizing assets into logical groupings or namespaces. Remember that the asset key should be unique across your Dagster instance to avoid conflicts and ensure that each asset can be distinctly identified.