When trying to launch a backfill of a `DynamicPar...
# ask-community
d
When trying to launch a backfill of a `DynamicPartition`ed asset, I'm getting the following
NotImplementedError
Copy code
NotImplementedError

  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 171, 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 352, 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 375, 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 517, 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/partition_mapping.py", line 169, in get_downstream_partitions_for_partitions
    self.get_downstream_partitions_for_partition_range(
  File "/home/wing/.cache/pypoetry/virtualenvs/syncdag-NSDSaiv4-py3.11/lib/python3.11/site-packages/dagster/_core/definitions/partition_mapping.py", line 284, in get_downstream_partitions_for_partition_range
    raise NotImplementedError()
In dagster version 1.3.11
Short term workaround is to just write a job that targets the asset and launch the job from the ui
c
Hm... are you defining the
AllPartitionMapping
on the asset? Looks like you're hitting that code path and the function has not been implemented on the
AllPartitionMapping
. Usually this partition mapping is used when the downstream asset is not partitioned, curious what your use case here is?
d
Yep, it's upstream of an
AllPartitionMapping
downstream asset is not partitioned
c
Hm... for some reason I'm unable to reproduce the backfill error using this code snippet on 1.3.11. I'm selecting both assets from the asset group in Dagit and clicking "materialize" for all partitions.
Copy code
@asset(partitions_def=DynamicPartitionsDefinition(name="foo"))
def my_asset():
    return 1


@asset(ins={"my_asset": AssetIn(partition_mapping=AllPartitionMapping())})
def unpartitioned(my_asset):
    return 1
is there something I'm missing here?
s
@Drew You Have you been able to make progress on this issue/does @claire’s snippet work for you?
d
sorry, had some infra issues with our dagster deployment and the job workaround was sufficient for the moment. I'll try and follow up on this today