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

[1/n][dagster-dlt] Move asset spec creation to DagsterDltTranslator.get_asset_spec #27207

Merged
merged 6 commits into from
Jan 21, 2025

Conversation

maximearmstrong
Copy link
Contributor

@maximearmstrong maximearmstrong commented Jan 17, 2025

Summary & Motivation

Move the asset spec creation from the asset decorator to a get_asset_spec method in the translator.

Also updates adds tests. No additional test was added for group names, owners, automation condition and auto-materialize policies. It is not recommended to update these values by overriding get_asset_spec because they are not related to dlt specifically.

How I Tested These Changes

Updated and new tests with BK

@maximearmstrong maximearmstrong self-assigned this Jan 21, 2025
@maximearmstrong maximearmstrong marked this pull request as ready for review January 21, 2025 19:31
@@ -29,13 +61,13 @@ def get_asset_key(self, resource: DltResource) -> AssetKey:
def get_auto_materialize_policy(self, resource: DltResource) -> Optional[AutoMaterializePolicy]:
"""Defines resource specific auto materialize policy.

This method can be overriden to provide custom auto materialize policy for a dlt resource.
This method can be overrdidden to provide custom auto materialize policy for a dlt resource.
Copy link

Choose a reason for hiding this comment

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

There is a typo in the docstring - overrdidden should be overridden

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 538c4b3

Copy link
Contributor

@OwenKephart OwenKephart left a comment

Choose a reason for hiding this comment

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

nice

@maximearmstrong maximearmstrong merged commit 304ff63 into master Jan 21, 2025
5 checks passed
@maximearmstrong maximearmstrong deleted the maxime/dlt-asset-spec-1 branch January 21, 2025 20:40
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.

2 participants