-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Introduce dg.map_asset_specs #26109
Merged
Merged
Introduce dg.map_asset_specs #26109
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Nov 23, 2024
Deploy preview for dagster-docs ready! Preview available at https://dagster-docs-h6t4kpxch-elementl.vercel.app Direct link to changed pages: |
schrockn
approved these changes
Nov 23, 2024
benpankow
force-pushed
the
benpankow/replace-attributes
branch
from
November 25, 2024 17:07
04fb74c
to
8634ced
Compare
benpankow
force-pushed
the
benpankow/map-specs
branch
from
November 25, 2024 17:08
3560a94
to
7a55661
Compare
benpankow
force-pushed
the
benpankow/map-specs
branch
from
November 25, 2024 17:54
7a55661
to
40db08b
Compare
cmpadden
pushed a commit
that referenced
this pull request
Dec 5, 2024
## Summary Based on conversation in #25941, introduces a new `dg.map_asset_specs` function which can be used to map a user-provided function over a set of `AssetSpec`s and `AssetDefinitions`. ```python @multi_asset(specs=[ AssetSpec(key="foo"), AssetSpec(key="bar"), ]) def my_multi_asset(): ... my_specs_and_defs = [ my_multi_asset, AssetSpec(key="external") ] my_mapped_specs_and_defs = map_asset_specs( lambda spec: spec.replace_attributes(owners="[email protected]"), my_specs_and_defs ) ``` ## Test Plan New unit tests. ## Changelog > Introduced dg.map_asset_specs to enable modifying `AssetSpec`s and `AssetsDefinition`s in bulk.
pskinnerthyme
pushed a commit
to pskinnerthyme/dagster
that referenced
this pull request
Dec 16, 2024
## Summary Based on conversation in dagster-io#25941, introduces a new `dg.map_asset_specs` function which can be used to map a user-provided function over a set of `AssetSpec`s and `AssetDefinitions`. ```python @multi_asset(specs=[ AssetSpec(key="foo"), AssetSpec(key="bar"), ]) def my_multi_asset(): ... my_specs_and_defs = [ my_multi_asset, AssetSpec(key="external") ] my_mapped_specs_and_defs = map_asset_specs( lambda spec: spec.replace_attributes(owners="[email protected]"), my_specs_and_defs ) ``` ## Test Plan New unit tests. ## Changelog > Introduced dg.map_asset_specs to enable modifying `AssetSpec`s and `AssetsDefinition`s in bulk.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Based on conversation in #25941, introduces a new
dg.map_asset_specs
function which can be used to map a user-provided function over a set ofAssetSpec
s andAssetDefinitions
.Test Plan
New unit tests.
Changelog