@@ -256,10 +256,10 @@ def create_data_rows_sync(self, items) -> None:
256
256
url_param : descriptor_url
257
257
})
258
258
259
- def create_data_rows (
260
- self ,
261
- items ,
262
- file_upload_thread_count = FILE_UPLOAD_THREAD_COUNT ) -> "Task " :
259
+ def create_data_rows (self ,
260
+ items ,
261
+ file_upload_thread_count = FILE_UPLOAD_THREAD_COUNT
262
+ ) -> "DataUpsertTask " :
263
263
""" Asynchronously bulk upload data rows
264
264
265
265
Use this instead of `Dataset.create_data_rows_sync` uploads for batches that contain more than 1000 data rows.
@@ -572,10 +572,10 @@ def _export(
572
572
is_streamable = res ["isStreamable" ]
573
573
return Task .get_task (self .client , task_id ), is_streamable
574
574
575
- def upsert_data_rows (
576
- self ,
577
- items ,
578
- file_upload_thread_count = FILE_UPLOAD_THREAD_COUNT ) -> "Task " :
575
+ def upsert_data_rows (self ,
576
+ items ,
577
+ file_upload_thread_count = FILE_UPLOAD_THREAD_COUNT
578
+ ) -> "DataUpsertTask " :
579
579
"""
580
580
Upserts data rows in this dataset. When "key" is provided, and it references an existing data row,
581
581
an update will be performed. When "key" is not provided a new data row will be created.
@@ -606,18 +606,14 @@ def upsert_data_rows(
606
606
>>> ])
607
607
>>> task.wait_till_done()
608
608
"""
609
- if len (items ) > MAX_DATAROW_PER_API_OPERATION :
610
- raise MalformedQueryException (
611
- f"Cannot upsert more than { MAX_DATAROW_PER_API_OPERATION } DataRows per function call."
612
- )
613
-
614
609
specs = DataRowUpsertItem .build (self .uid , items )
615
610
return self ._exec_upsert_data_rows (specs , file_upload_thread_count )
616
611
617
612
def _exec_upsert_data_rows (
618
- self ,
619
- specs : List [DataRowItemBase ],
620
- file_upload_thread_count : int = FILE_UPLOAD_THREAD_COUNT ) -> "Task" :
613
+ self ,
614
+ specs : List [DataRowItemBase ],
615
+ file_upload_thread_count : int = FILE_UPLOAD_THREAD_COUNT
616
+ ) -> "DataUpsertTask" :
621
617
622
618
manifest = DataRowUploader .upload_in_chunks (
623
619
client = self .client ,
0 commit comments