Daniel Mosesson
03/28/2022, 11:01 AMowen
03/28/2022, 5:55 PMowen
03/28/2022, 5:59 PMowen
03/28/2022, 6:01 PMDaniel Mosesson
03/28/2022, 6:27 PM@op
like I currently am and then in the op doing the actual work?Daniel Mosesson
03/28/2022, 6:28 PMio_manager
vs. the individual assets/ops?owen
03/28/2022, 6:28 PM@op
decorators with @asset
(but the functions underneath the decorators would remain basically the same, other than combining together the bodies of a couple of the ops)Daniel Mosesson
03/28/2022, 6:29 PM@op
or no?owen
03/28/2022, 6:29 PMDaniel Mosesson
03/28/2022, 6:30 PMDaniel Mosesson
03/28/2022, 6:30 PMowen
03/28/2022, 6:32 PM@asset
will create an op for you (and will do some other stuff to help dagster figure out how to connect the generated ops to other ops), so the code underneath the asset decorator has the same constraints as code underneath the op decatorator (so no, you shouldn't create ops manually in those functions)owen
03/28/2022, 6:32 PMDaniel Mosesson
03/28/2022, 6:33 PMDaniel Mosesson
03/28/2022, 6:33 PMowen
03/28/2022, 6:36 PMDaniel Mosesson
03/28/2022, 6:38 PMDaniel Mosesson
03/28/2022, 6:39 PM@asset(required_resource_keys = ..., <what goes here for upstream assets. if they do or don't need data passed around?)
owen
03/28/2022, 6:39 PMnon_argument_deps={AssetKey("table1"), AssetKey("table2")}
)owen
03/28/2022, 6:40 PMDaniel Mosesson
03/28/2022, 6:42 PMNothing
around to make it it all work)owen
03/28/2022, 6:43 PMDaniel Mosesson
03/28/2022, 6:43 PMDaniel Mosesson
03/28/2022, 6:58 PMDaniel Mosesson
03/28/2022, 7:07 PMowen
03/28/2022, 7:10 PMowen
03/28/2022, 7:14 PMowen
03/28/2022, 7:14 PMDaniel Mosesson
03/28/2022, 7:14 PMDaniel Mosesson
03/28/2022, 7:15 PMDaniel Mosesson
03/28/2022, 7:15 PMowen
03/28/2022, 7:15 PMDaniel Mosesson
03/28/2022, 7:15 PMop
that took in a list of files to process as part of the configDaniel Mosesson
03/28/2022, 7:15 PMDaniel Mosesson
03/28/2022, 7:16 PMDaniel Mosesson
03/28/2022, 7:17 PMop
output or similar?)Daniel Mosesson
03/28/2022, 7:18 PMowen
03/28/2022, 7:20 PMDaniel Mosesson
03/28/2022, 7:21 PMDaniel Mosesson
03/28/2022, 7:22 PMowen
03/28/2022, 7:25 PMDaniel Mosesson
03/28/2022, 7:26 PMDaniel Mosesson
03/28/2022, 7:37 PMowen
03/28/2022, 7:37 PMDaniel Mosesson
03/28/2022, 7:38 PMDaniel Mosesson
03/28/2022, 7:38 PMowen
03/28/2022, 7:39 PMowen
03/28/2022, 7:39 PMDaniel Mosesson
03/28/2022, 7:40 PMDaniel Mosesson
03/28/2022, 7:41 PMowen
03/28/2022, 7:44 PMDaniel Mosesson
03/28/2022, 7:45 PMop
from an op
owen
03/28/2022, 7:46 PMDaniel Mosesson
03/28/2022, 7:50 PMAssetsDefinition object has no attribute 'asset_key'.
Function decoration looks like:
@asset(ins={'files': list_of_files_asset}, required_resource_keys={'r1','r2'}, non_argument_deps={AssetKey('<name of upstream asset')})
Daniel Mosesson
03/28/2022, 7:50 PMowen
03/28/2022, 8:01 PMDaniel Mosesson
03/28/2022, 8:05 PMrun_code
I just figured out @asset(ins={'foo': AssetIn(AssetKey('my_asset_key'))})