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

Drew You

04/19/2023, 1:12 PM
Kind of stumped on this one. I have an asset with no upstream assets defined as follows:
Copy code
@asset(
    partitions_def=MultiPartitionsDefinition(
        {
            "days": DailyPartitionsDefinition(
                start_date=datetime.strptime("2019-09-10", "%Y-%m-%d"),
                timezone="Etc/UTC",
                end_offset=-1,
            ),
            "dynamic_partitions_definition": futures_partitions["asset"],
        }
    )
)
where
"dynamic_partitions_definition"
points at a dict of `DynamicPartitionDefinition`s that are populated by another asset. When I try to backfill this asset in dagit, I get a popup that says "An unexpected error occurred. This backfill was not launched." with this error:
Copy code
dagster._check.CheckError: Failure condition: upstream_partitions_subset must be a TimeWindowPartitionsSubset
  File "/home/wing/.cache/pypoetry/virtualenvs/syncdag-NSDSaiv4-py3.11/lib/python3.11/site-packages/dagster_graphql/implementation/utils.py", line 126, in _fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/wing/.cache/pypoetry/virtualenvs/syncdag-NSDSaiv4-py3.11/lib/python3.11/site-packages/dagster_graphql/implementation/utils.py", line 57, in _fn
    result = fn(self, graphene_info, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wing/.cache/pypoetry/virtualenvs/syncdag-NSDSaiv4-py3.11/lib/python3.11/site-packages/dagster_graphql/schema/roots/mutation.py", line 298, in mutate
    return create_and_launch_partition_backfill(graphene_info, backfillParams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wing/.cache/pypoetry/virtualenvs/syncdag-NSDSaiv4-py3.11/lib/python3.11/site-packages/dagster_graphql/implementation/execution/backfill.py", line 158, in create_and_launch_partition_backfill
    backfill = PartitionBackfill.from_asset_partitions(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wing/.cache/pypoetry/virtualenvs/syncdag-NSDSaiv4-py3.11/lib/python3.11/site-packages/dagster/_core/execution/backfill.py", line 325, in from_asset_partitions
    serialized_asset_backfill_data=AssetBackfillData.from_asset_partitions(
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wing/.cache/pypoetry/virtualenvs/syncdag-NSDSaiv4-py3.11/lib/python3.11/site-packages/dagster/_core/execution/asset_backfill.py", line 234, in from_asset_partitions
    target_subset |= asset_graph.bfs_filter_subsets(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wing/.cache/pypoetry/virtualenvs/syncdag-NSDSaiv4-py3.11/lib/python3.11/site-packages/dagster/_core/definitions/asset_graph.py", line 453, in bfs_filter_subsets
    partition_mapping.get_downstream_partitions_for_partitions(
  File "/home/wing/.cache/pypoetry/virtualenvs/syncdag-NSDSaiv4-py3.11/lib/python3.11/site-packages/dagster/_core/definitions/time_window_partition_mapping.py", line 131, in get_downstream_partitions_for_partitions
    check.failed("upstream_partitions_subset must be a TimeWindowPartitionsSubset")
  File "/home/wing/.cache/pypoetry/virtualenvs/syncdag-NSDSaiv4-py3.11/lib/python3.11/site-packages/dagster/_check/__init__.py", line 1669, in failed
    raise CheckError(f"Failure condition: {desc}")
o

owen

04/19/2023, 5:56 PM
hey @Drew You! are there any assets downstream of this asset? or is this just an isolated node?
d

Drew You

04/19/2023, 6:11 PM
you nailed it. it was the downstream asset causing it. My bad, the error message made me think that dagster thought there was something upstream of the backfill.
o

owen

04/19/2023, 6:12 PM
that's definitely a confusing error message blobl grimace
🤣 1
2 Views