File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
pyatlan/model/assets/core Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,13 @@ def processes_creator(
107
107
108
108
return process_list
109
109
110
+ def processes_batch_save (client , process_list ):
111
+ batch_size = 20
112
+ total_processes = len (process_list )
113
+ for i in range (0 , total_processes , batch_size ):
114
+ batch = process_list [i : i + batch_size ]
115
+ client .asset .save (batch )
116
+
110
117
type_name : str = Field (default = "AIModel" , allow_mutation = False )
111
118
112
119
@validator ("type_name" )
Original file line number Diff line number Diff line change @@ -145,7 +145,9 @@ def test_ai_model_processes_creator(
145
145
AIDatasetType .OUTPUT : [Table .ref_by_guid (guid = guids [4 ])],
146
146
}
147
147
created_processes = AIModel .processes_creator (
148
- a_i_model_guid = ai_model .guid , ai_model_name = ai_model .name , database_dict = database_dict
148
+ a_i_model_guid = ai_model .guid ,
149
+ ai_model_name = ai_model .name ,
150
+ database_dict = database_dict ,
149
151
)
150
152
151
153
mutation_response = client .asset .save (created_processes ) # type: ignore
You can’t perform that action at this time.
0 commit comments