-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RFC: Fetch Cross-Repo Asset Deps (#7259)
- Loading branch information
1 parent
90ac1b5
commit a5c2854
Showing
7 changed files
with
290 additions
and
30 deletions.
There are no files selected for viewing
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 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 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 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
42 changes: 42 additions & 0 deletions
42
python_modules/dagster-graphql/dagster_graphql_tests/graphql/cross_repo_asset_deps.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# pylint: disable=redefined-outer-name | ||
from dagster import AssetGroup, AssetKey, SourceAsset, asset, repository | ||
|
||
|
||
@asset | ||
def upstream_asset(): | ||
return 5 | ||
|
||
|
||
upstream_asset_group = AssetGroup([upstream_asset]) | ||
|
||
|
||
@repository | ||
def upstream_assets_repository(): | ||
return [upstream_asset_group] | ||
|
||
|
||
source_assets = [SourceAsset(AssetKey("upstream_asset"))] | ||
|
||
|
||
@asset | ||
def downstream_asset1(upstream_asset): | ||
assert upstream_asset | ||
|
||
|
||
@asset | ||
def downstream_asset2(upstream_asset): | ||
assert upstream_asset | ||
|
||
|
||
downstream_asset_group1 = AssetGroup(assets=[downstream_asset1], source_assets=source_assets) | ||
downstream_asset_group2 = AssetGroup(assets=[downstream_asset2], source_assets=source_assets) | ||
|
||
|
||
@repository | ||
def downstream_assets_repository1(): | ||
return [downstream_asset_group1] | ||
|
||
|
||
@repository | ||
def downstream_assets_repository2(): | ||
return [downstream_asset_group2] |
Oops, something went wrong.