I updated one of my existing assets to a multi-ass...
# ask-community
a
I updated one of my existing assets to a multi-asset without changing the function name, and listed the assetOut name as the same as it was before. Before this was just a simple
@asset
with
def devices_to_update_request
Copy code
@multi_asset(partitions_def=daily_partitions_def,
             outs={'devices_to_update_request': AssetOut(),
                   'client_device_stats': AssetOut()})
def devices_to_update_request(context:OpExecutionContext):
   ...
This error seems to be thrown when I go to
define_asset_job
-- any idea why?
Copy code
File "/opt/dagster/app/data_pipeline/alarm_watchdog_report/pipeline.py", line 293, in <module>
    alarm_watchdog_report_job = define_asset_job("alarm_watchdog_report_job", selection=[
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/unresolved_asset_job_definition.py", line 398, in define_asset_job
    resolved_selection = AssetSelection.keys(
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/unresolved_asset_job_definition.py", line 399, in <genexpr>
    *(el.key for el in cast(Sequence[Union[AssetsDefinition, SourceAsset]], selection))
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/assets.py", line 583, in key
    check.invariant(
  File "/usr/local/lib/python3.10/site-packages/dagster/_check/__init__.py", line 1654, in invariant
    raise CheckError(f"Invariant failed. Description: {desc}")
dagster._check.CheckError: Invariant failed. Description: Tried to retrieve asset key from an assets definition with multiple asset keys: ["devices_to_update_request"], ["client_device_stats"]