Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Implied" upstream external assets take precedence over "explicit" upstream external assets #21760

Open
leejlFG opened this issue May 9, 2024 · 0 comments
Labels
area: external-assets Related to External Assets type: bug Something isn't working

Comments

@leejlFG
Copy link

leejlFG commented May 9, 2024

Dagster version

1.7.4

What's the issue?

The documentation says that to define an upstream dependency for a dbt model where the upstream dependency that in Dagster outside of dbt, one should reference it in the sources.yml file:

sources:
  - name: dagster
    tables:
      - name: upstream
        meta:
          dagster:
            asset_key: ["upstream"]

However, if that upstream asset is defined as an explicit external asset in another code location with any description or metadata like this:

AssetSpec(
    key=["upstream"],
    description="This description disappears from the UI.",
)

The explicitly defined external asset is "overwritten" in the UI by an asset created implicitly by the dbt project. Any information added to the explicit external asset is unavailable, and the asset only exists in the dbt project's code location instead.

This behavior occurs outside of dbt projects as well - the same problem exists when adding deps to a Dagster asset in another code location as well. The auto-stubbed asset takes precedence over the explicit asset.

What did you expect to happen?

Expected behavior is for the dbt asset to correctly recognize and link to the correct asset in the other code location, instead of creating a new one and ignoring the explicit one.

How to reproduce?

Define one external asset in code location A, then define a downstream asset in code location B that references the external asset in path form as a dependency like deps=[["upstream"]].

Deployment type

Other Docker-based deployment

Deployment details

GRPC servers deployed on ECS.

Additional information

Problem still exists even after shutting down code location B and clearing any materializations with the UI or graphql wipeAssets mutation. As long as code location B remains shut down, the explicit external asset defined in code location A shows the correct information, but when turning code location B back on, the implicit asset takes precedence again.

When running locally with dagster dev this problem does not exist.

Message from the maintainers

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

@leejlFG leejlFG added the type: bug Something isn't working label May 9, 2024
@garethbrickman garethbrickman added integration: dbt Related to dagster-dbt area: external-assets Related to External Assets and removed integration: dbt Related to dagster-dbt labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: external-assets Related to External Assets type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants