-
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.
[docs] - Asset config [CON-89] (#8119)
* First pass at asset config * First pass at config example * Move sections up * Run scripts * Remove recommendation * Review comments and clean up * Add import requests to example
- Loading branch information
1 parent
d759550
commit 2e236b2
Showing
2 changed files
with
42 additions
and
11 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
15 changes: 15 additions & 0 deletions
15
examples/docs_snippets/docs_snippets/concepts/assets/asset_config.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,15 @@ | ||
import requests | ||
|
||
from dagster import asset | ||
|
||
# start_example | ||
|
||
|
||
@asset(config_schema={"api_endpoint": str}) | ||
def my_configurable_asset(context): | ||
api_endpoint = context.op_config["api_endpoint"] | ||
data = requests.get(f"{api_endpoint}/data").json() | ||
return data | ||
|
||
|
||
# end_example |
2e236b2
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.
Successfully deployed to the following URLs:
dagster – ./docs/next
dagster.vercel.app
dagster-git-master-elementl.vercel.app
dagster-elementl.vercel.app
docs.dagster.io
new-docs.dagster.io