@@ -239,9 +239,10 @@ class ModelSlice(Slice):
239
239
@classmethod
240
240
def query_str (cls ):
241
241
query_str = """
242
- query getDataRowIdenfifiersBySavedModelQueryPyApi($id: ID!, $from: DataRowIdentifierCursorInput, $first: Int!) {
242
+ query getDataRowIdenfifiersBySavedModelQueryPyApi($id: ID!, $modelRunId: ID, $ from: DataRowIdentifierCursorInput, $first: Int!) {
243
243
getDataRowIdentifiersBySavedModelQuery(input: {
244
244
savedQueryId: $id,
245
+ modelRunId: $modelRunId,
245
246
after: $from
246
247
first: $first
247
248
}) {
@@ -263,17 +264,23 @@ def query_str(cls):
263
264
"""
264
265
return query_str
265
266
266
- def get_data_row_ids (self ) -> PaginatedCollection :
267
+ def get_data_row_ids (self , model_run_id : str ) -> PaginatedCollection :
267
268
"""
268
269
Fetches all data row ids that match this Slice
269
270
271
+ Params
272
+ model_run_id: str, required, uid or cuid of model run
273
+
270
274
Returns:
271
275
A PaginatedCollection of data row ids
272
276
"""
273
277
return PaginatedCollection (
274
278
client = self .client ,
275
279
query = ModelSlice .query_str (),
276
- params = {'id' : str (self .uid )},
280
+ params = {
281
+ 'id' : str (self .uid ),
282
+ 'modelRunId' : model_run_id
283
+ },
277
284
dereferencing = ['getDataRowIdentifiersBySavedModelQuery' , 'nodes' ],
278
285
obj_class = lambda _ , data_row_id_and_gk : data_row_id_and_gk .get ('id'
279
286
),
@@ -282,17 +289,24 @@ def get_data_row_ids(self) -> PaginatedCollection:
282
289
'endCursor'
283
290
])
284
291
285
- def get_data_row_identifiers (self ) -> PaginatedCollection :
292
+ def get_data_row_identifiers (self ,
293
+ model_run_id : str ) -> PaginatedCollection :
286
294
"""
287
295
Fetches all data row ids and global keys (where defined) that match this Slice
288
296
297
+ Params:
298
+ model_run_id : str, required, uid or cuid of model run
299
+
289
300
Returns:
290
301
A PaginatedCollection of Slice.DataRowIdAndGlobalKey
291
302
"""
292
303
return PaginatedCollection (
293
304
client = self .client ,
294
305
query = ModelSlice .query_str (),
295
- params = {'id' : str (self .uid )},
306
+ params = {
307
+ 'id' : str (self .uid ),
308
+ 'modelRunId' : model_run_id
309
+ },
296
310
dereferencing = ['getDataRowIdentifiersBySavedModelQuery' , 'nodes' ],
297
311
obj_class = lambda _ , data_row_id_and_gk : Slice .DataRowIdAndGlobalKey (
298
312
data_row_id_and_gk .get ('id' ),
0 commit comments