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

dlt Resource Failure Aware Asset Materialization #21856

Merged
merged 3 commits into from
May 15, 2024

Conversation

edsoncezar16
Copy link
Contributor

@edsoncezar16 edsoncezar16 commented May 15, 2024

Summary & Motivation

There are some situations where some dlt jobs fail but Dagster reports successful materializations of the dlt assets. This PR ensures that reported materialization events correctly map to successful dlt resources without failed jobs.

How I Tested These Changes

  • make pyright (ensured the proposed changes did not introduce any errors, but other libraries were generating errors when running locally)

  • make ruff

  • python -m pytest python_modules/libraries/dagster-embedded-elt/dagster_embedded_elt_tests/dlt_tests

@cmpadden cmpadden self-requested a review May 15, 2024 04:22
@@ -90,7 +90,8 @@ def extract_resource_metadata(
job
for load_package in load_info_dict.get("load_packages", [])
for job in load_package.get("jobs", [])
if job.get("table_name") == resource.table_name
if resource.table_name
in [table.get("table_name") for table in load_package.get("tables", [])]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious if using table_name will work if a destination like s3 (or local filesystem) is used, since these aren't considered tables.

Would it be possible to get the failure for the resource name instead?

Copy link
Contributor

@cmpadden cmpadden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tyvm!

@cmpadden cmpadden merged commit 06dad1a into dagster-io:master May 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants