Add "@asset" to decorate a function as a DAG and an asset#41325
Add "@asset" to decorate a function as a DAG and an asset#41325Lee-W merged 29 commits intoapache:mainfrom
Conversation
f0ea15c to
017cdd9
Compare
|
This 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
b6bb01b
Compare
2b7dbda to
cc11458
Compare
|
@uranusjr I tried to make the |
6257830 to
0ef189e
Compare
3ac1a6a to
a7e4dcc
Compare
…_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.
0417860 to
2060ead
Compare
|
GitHub seems to have changed something and now I can’t approve my own PR. So consider this as a manual approval. ✅ |
Thanks! Let me merge it now |
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