Skip to content

Can't define jobs of multi assets with different partitions definitions #32791

@aksestok

Description

@aksestok

What's the issue?

It's currently not possible to define asset jobs of multi assets where the asset specs have different partitions definitions. Looks like this was missed in #23824.

The error surfaces when you want to use try to materialize a subset of assets in a graph of assets that contain different partitions definitions.

What did you expect to happen?

It should be possible to run a subset of assets in a graph of assets that have different partitions definitions.

How to reproduce?

import dagster as dg

spec1 = dg.AssetSpec("asset1", partitions_def=dg.StaticPartitionsDefinition(["a", "b"]))
spec2 = dg.AssetSpec("asset2", partitions_def=dg.StaticPartitionsDefinition(["x", "y"]))
dg.AssetsDefinition(specs=[spec1, spec2])  # Raises DagsterInvalidDefinitionError

Dagster version

dagster, version 1.12.1

Deployment type

Dagster Cloud

Deployment details

No response

Additional information

PR incoming.

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions