File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
pyatlan/model/assets/core Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,14 @@ def processes_creator(
71
71
ai_model : AIModel ,
72
72
dataset_dict : Dict [AIDatasetType , list ],
73
73
) -> List [Process ]:
74
+ """
75
+ Creates a list of Process objects representing the relationships between an AI model and its datasets.
76
+
77
+ :param ai_model: the AI model for which to create processes
78
+ :param dataset_dict: dictionary mapping AI dataset types to lists of assets
79
+ :returns: list of Process objects representing the AI model's data lineage
80
+ :raises ValueError: when the AI model is missing required attributes (guid or name)
81
+ """
74
82
if not ai_model .guid or not ai_model .name :
75
83
raise ValueError ("AI model must have both guid and name attributes" )
76
84
process_list = []
@@ -103,6 +111,14 @@ def processes_creator(
103
111
104
112
@classmethod
105
113
def processes_batch_save (cls , client , process_list : List [Process ]) -> List :
114
+ """
115
+ Saves a list of Process objects to Atlan in batches to optimize performance.
116
+ We save the processes in batches of 20.
117
+
118
+ :param client: Atlan client instance for making API calls
119
+ :param process_list: list of Process objects to save
120
+ :returns: list of API responses from each batch save operation
121
+ """
106
122
batch_size = 20
107
123
total_processes = len (process_list )
108
124
responses = []
You can’t perform that action at this time.
0 commit comments