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

Aaron T

05/31/2023, 6:47 PM
Does anyone have an example of using a
StaticPartitionMapping
with an
AssetIn
?
c

claire

05/31/2023, 11:18 PM
Here's a small example if it helps:
Copy code
partitions_a = StaticPartitionsDefinition(["foo_a"])
partitions_b = StaticPartitionsDefinition(["foo_b"])


@asset(partitions_def=partitions_a)
def asset_a():
    pass


@asset(
    partitions_def=partitions_b,
    ins={"asset_a": AssetIn(partition_mapping=StaticPartitionMapping({"foo_a": "foo_b"}))},
)
def asset_b(asset_a):
    pass