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

Samuel Stütz

07/18/2022, 3:17 PM
I am struggling to understand how to partition an asset one multiple dimensions and what implications that has. All current partitioning relies on simple String Partition keys and then some values associated with them. I would like to add one dimensions in front, call it customer_project instead of
Partitions['2022-7-17','2022-7-18'] I would like to have ['custA-2022-7-17', 'custA-2022-7-18', 'custB-2022-7-17', 'custB-2022-7-18']
. Is this even feasible. I am guessing the custB-2022-7-17…custB-2022-7-18 syntax would break. If I don’t care about that. The ui maybe unoptimized for this extra dimension. If I don’t care about that either. Which functions do I actually have to implement in the ParitionDef for this to work? I assume
get_partitions():List[Partition[CustTimePartition]
Copy code
class CustTimeWindow(TimeWindow)
    (start)
    (end)
    cust_id
and then mappers which IdentityMap the cust_id, and timewindowmap the rest.
get_default_partition_mapping
and that should be it. I would like to know from someone with deeper understanding if that will just be a failed attempt or should be doable?
j

jamie

07/18/2022, 4:15 PM
hi @Samuel Stütz. we don't currently support partitions in more than one dimension. You may be able to use the static partition concept (either via
StaticPartitionsDefinition
for assets (docs) or
static_partitioned_config
for jobs (docs)) to define all of the partitions you want
s

sandy

07/20/2022, 12:05 AM
Here's the issue where we're tracking this: https://github.com/dagster-io/dagster/issues/4591