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):
8484# Don't want to crowd the name space with internals
8585
8686
87+ # Bulk upsert values
88+ class _UpsertDataRowMetadataInput (_CamelCaseMixin ):
89+ schema_id : str
90+ value : Any
91+
92+
8793# Batch of upsert values for a datarow
8894class _UpsertBatchDataRowMetadata (_CamelCaseMixin ):
8995 data_row_id : str
90- fields : List [Dict ]
96+ fields : List [_UpsertDataRowMetadataInput ]
9197
9298
9399class _DeleteBatchDataRowMetadata (_CamelCaseMixin ):
@@ -398,7 +404,7 @@ def _bulk_export(_data_row_ids: List[str]) -> List[DataRowMetadata]:
398404
399405 def _parse_upsert (
400406 self , metadatum : DataRowMetadataField
401- ) -> List [Dict ]:
407+ ) -> List [_UpsertDataRowMetadataInput ]:
402408 """Format for metadata upserts to GQL"""
403409
404410 if metadatum .schema_id not in self .fields_by_id :
@@ -422,7 +428,7 @@ def _parse_upsert(
422428 else :
423429 raise ValueError (f"Unknown type: { schema } " )
424430
425- return parsed
431+ return [ _UpsertDataRowMetadataInput ( ** p ) for p in parsed ]
426432
427433 def _validate_delete (self , delete : DeleteDataRowMetadata ):
428434 if not len (delete .fields ):
You can’t perform that action at this time.
0 commit comments