File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,16 @@ class DataRowMetadataBatchResponse(_CamelCaseMixin):
84
84
# Don't want to crowd the name space with internals
85
85
86
86
87
+ # Bulk upsert values
88
+ class _UpsertDataRowMetadataInput (_CamelCaseMixin ):
89
+ schema_id : str
90
+ value : Any
91
+
92
+
87
93
# Batch of upsert values for a datarow
88
94
class _UpsertBatchDataRowMetadata (_CamelCaseMixin ):
89
95
data_row_id : str
90
- fields : List [Dict ]
96
+ fields : List [_UpsertDataRowMetadataInput ]
91
97
92
98
93
99
class _DeleteBatchDataRowMetadata (_CamelCaseMixin ):
@@ -398,7 +404,7 @@ def _bulk_export(_data_row_ids: List[str]) -> List[DataRowMetadata]:
398
404
399
405
def _parse_upsert (
400
406
self , metadatum : DataRowMetadataField
401
- ) -> List [Dict ]:
407
+ ) -> List [_UpsertDataRowMetadataInput ]:
402
408
"""Format for metadata upserts to GQL"""
403
409
404
410
if metadatum .schema_id not in self .fields_by_id :
@@ -422,7 +428,7 @@ def _parse_upsert(
422
428
else :
423
429
raise ValueError (f"Unknown type: { schema } " )
424
430
425
- return parsed
431
+ return [ _UpsertDataRowMetadataInput ( ** p ) for p in parsed ]
426
432
427
433
def _validate_delete (self , delete : DeleteDataRowMetadata ):
428
434
if not len (delete .fields ):
You can’t perform that action at this time.
0 commit comments