@@ -335,6 +335,7 @@ def write_dataframe(
335335 show_progress = False ,
336336 bulk_import_name = None ,
337337 commit_timeout = None ,
338+ perform_timeout = None ,
338339 perform_wait_callback = None ,
339340 ):
340341 """Write a given DataFrame to a Treasure Data table.
@@ -453,6 +454,10 @@ def write_dataframe(
453454 Timeout in seconds for the bulk import commit operation. If None,
454455 no timeout is applied.
455456
457+ perform_timeout : int, optional, default: None
458+ Timeout in seconds for the bulk import perform operation. If None,
459+ no timeout is applied.
460+
456461 perform_wait_callback : callable, optional, default: None
457462 A callable to be called on every tick of wait interval during
458463 bulk import job execution.
@@ -539,6 +544,7 @@ def write_dataframe(
539544 show_progress = show_progress ,
540545 bulk_import_name = bulk_import_name ,
541546 commit_timeout = commit_timeout ,
547+ perform_timeout = perform_timeout ,
542548 perform_wait_callback = perform_wait_callback ,
543549 )
544550 stack .close ()
@@ -553,6 +559,7 @@ def _bulk_import(
553559 show_progress = False ,
554560 bulk_import_name = None ,
555561 commit_timeout = None ,
562+ perform_timeout = None ,
556563 perform_wait_callback = None ,
557564 ):
558565 """Write a specified CSV file to a Treasure Data table.
@@ -594,6 +601,10 @@ def _bulk_import(
594601 Timeout in seconds for the bulk import commit operation. If None,
595602 no timeout is applied.
596603
604+ perform_timeout : int, optional, default: None
605+ Timeout in seconds for the bulk import perform operation. If None,
606+ no timeout is applied.
607+
597608 perform_wait_callback : callable, optional, default: None
598609 A callable to be called on every tick of wait interval during
599610 bulk import job execution.
@@ -659,7 +670,9 @@ def _bulk_import(
659670 logger .debug (f"uploaded data in { time .time () - s_time :.2f} sec" )
660671
661672 logger .info ("performing a bulk import job" )
662- job = bulk_import .perform (wait = True , wait_callback = perform_wait_callback )
673+ job = bulk_import .perform (
674+ wait = True , timeout = perform_timeout , wait_callback = perform_wait_callback
675+ )
663676
664677 if 0 < bulk_import .error_records :
665678 logger .warning (
0 commit comments