Uh oh!
There was an error while loading. Please reload this page.
Add "@asset" to decorate a function as a DAG and an asset - #41325
Conversation
f0ea15c to
017cdd9CompareThis pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
91fb531 to
b6bb01bCompare2b7dbda to
cc11458CompareUh oh!
There was an error while loading. Please reload this page.
Lee-W
commented
Oct 30, 2024
@uranusjr I tried to make the |
Uh oh!
There was an error while loading. Please reload this page.
6257830 to
0ef189eCompare3ac1a6a to
a7e4dccCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…_fetch_active_assets_by_name
…inition instead of asset decorator
The validate_identifier validator already checks the length, so we don't need an extra one doing that.
uranusjr
commented
Nov 14, 2024
GitHub seems to have changed something and now I can’t approve my own PR. So consider this as a manual approval. ✅ |
Lee-W
commented
Nov 14, 2024
Thanks! Let me merge it now |
potiuk
commented
Nov 14, 2024
They are really experimenting with Approvals it seems...... |
Why
As part of AIP-75
What
Add an
assetdecorator which can be used to decorate a function and create a DAG and an asset.In the example above, it create a
DAG(dag_id="asset2_producer", schedule=None, ...)and anAsset(name="asset2_producer", uri="s3://bucket/object"). Inside the function,selfcan be used to access the asset with nameasset2_producer,contextis just likecontextin a normal task andasset1_produceris used to access an asset with name=asset1_producerCloses: #42314