-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Enable dlt asset metadata via translator #22047
Enable dlt asset metadata via translator #22047
Conversation
@@ -11,6 +11,8 @@ | |||
|
|||
@dataclass | |||
class DagsterDltTranslator: | |||
metadata_by_resource_name: Optional[Mapping[str, Any]] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels weird to have this in the base DagsterDltTranslator
class. If a user wants to have this, you can subclass DagsterDltTranslator
and add it yourself as a property. [1]
python_modules/libraries/dagster-embedded-elt/dagster_embedded_elt/dlt/translator.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Going to run tests before merging.
python_modules/libraries/dagster-embedded-elt/dagster_embedded_elt/dlt/asset_decorator.py
Outdated
Show resolved
Hide resolved
## Summary & Motivation Asset metadata is an essential component of assets definition in real projects. This PR adds a parameter in the DagsterDltTranslator to define resource specific metadata. This is an idea to circumvent the fact that dlt does nor uses a configuration file such as Sling's replication.yaml, where would be natural to define metadata to be read by the translator. ## How I Tested These Changes make pyright make ruff python -m pytest python_modules/libraries/dagster-embedded-elt/dagster_embedded_elt_tests/dlt_tests
Summary & Motivation
Asset metadata is an essential component of assets definition in real projects. This PR adds a parameter in the DagsterDltTranslator to define resource specific metadata.
This is an idea to circumvent the fact that dlt does nor uses a configuration file such as Sling's replication.yaml, where would be natural to define metadata to be read by the translator.
How I Tested These Changes
make pyright
make ruff
python -m pytest python_modules/libraries/dagster-embedded-elt/dagster_embedded_elt_tests/dlt_tests