File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -342,6 +342,16 @@ def convert_item(item):
342342 f"Must pass an iterable to create_data_rows. Found { type (items )} "
343343 )
344344
345+ # TODO: If any datarows contain metadata, we're limiting max # of datarows
346+ # until we address performance issues with datarow create with metadata
347+ max_datarow_with_metadata = 30_000
348+ if (len (items ) > max_datarow_with_metadata ):
349+ for row in items :
350+ if 'metadata_fields' in row :
351+ raise ValueError (
352+ f"Cannot create more than { max_datarow_with_metadata } DataRows, if any DataRows contain metadata"
353+ )
354+
345355 with ThreadPoolExecutor (file_upload_thread_count ) as executor :
346356 futures = [executor .submit (convert_item , item ) for item in items ]
347357 items = [future .result () for future in as_completed (futures )]
You can’t perform that action at this time.
0 commit comments