-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5380a5d
commit dbe4617
Showing
11 changed files
with
33 additions
and
54 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
21 changes: 12 additions & 9 deletions
21
...ocs_beta_snippets/docs_beta_snippets/guides/data-modeling/metadata/definition-metadata.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 |
---|---|---|
@@ -1,18 +1,21 @@ | ||
from dagster import asset, AssetSpec, MetadataValue | ||
from dagster import AssetSpec, MetadataValue, asset | ||
|
||
|
||
# You can attach metadata via the `metadata` argument on the `@asset` decorator. | ||
@asset(metadata={ | ||
"link_to_docs": MetadataValue.url("https://..."), | ||
"snippet": MetadataValue.md("# Embedded markdown\n...") | ||
}) | ||
def my_asset(): | ||
... | ||
@asset( | ||
metadata={ | ||
"link_to_docs": MetadataValue.url("https://..."), | ||
"snippet": MetadataValue.md("# Embedded markdown\n..."), | ||
} | ||
) | ||
def my_asset(): ... | ||
|
||
|
||
# You can also use `metadata` with `AssetSpec` | ||
my_external_asset = AssetSpec( | ||
"my_external_asset", | ||
metadata={ | ||
"link_to_docs": MetadataValue.url("https://..."), | ||
"snippet": MetadataValue.md("# Embedded markdown\n...") | ||
} | ||
"snippet": MetadataValue.md("# Embedded markdown\n..."), | ||
}, | ||
) |
12 changes: 0 additions & 12 deletions
12
examples/docs_beta_snippets/docs_beta_snippets/guides/data-modeling/metadata/kinds.py
This file was deleted.
Oops, something went wrong.
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
10 changes: 5 additions & 5 deletions
10
examples/docs_beta_snippets/docs_beta_snippets/guides/data-modeling/metadata/owners.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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
from dagster import asset, AssetSpec | ||
from dagster import AssetSpec, asset | ||
|
||
|
||
# You can attach owners via the `owners` argument on the `@asset` decorator. | ||
@asset(owners=["[email protected]", "team:data-eng"]) | ||
def my_asset(): | ||
... | ||
def my_asset(): ... | ||
|
||
|
||
# You can also use `owners` with `AssetSpec` | ||
my_external_asset = AssetSpec( | ||
"my_external_asset", | ||
owners=["[email protected]", "team:roof", "team:corpdev"] | ||
"my_external_asset", owners=["[email protected]", "team:roof", "team:corpdev"] | ||
) |
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
3 changes: 2 additions & 1 deletion
3
...s/docs_beta_snippets/docs_beta_snippets/guides/data-modeling/metadata/runtime-metadata.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
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 |
---|---|---|
|
@@ -40,4 +40,4 @@ def my_asset(): | |
} | ||
) | ||
} | ||
) | ||
) |
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
10 changes: 5 additions & 5 deletions
10
examples/docs_beta_snippets/docs_beta_snippets/guides/data-modeling/metadata/tags.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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
from dagster import asset, AssetSpec | ||
from dagster import AssetSpec, asset | ||
|
||
|
||
# You can attach tags via the `tags` argument on the `@asset` decorator. | ||
@asset(tags={"domain": "marketing", "pii": "true"}) | ||
def my_asset(): | ||
... | ||
def my_asset(): ... | ||
|
||
|
||
# You can also use `tags` with `AssetSpec` | ||
my_external_asset = AssetSpec( | ||
"my_external_asset", | ||
tags={"domain": "legal", "sensitive": ""} | ||
"my_external_asset", tags={"domain": "legal", "sensitive": ""} | ||
) |