@@ -139,6 +139,7 @@ def create_transfer_job[T](
139139 source_bucket : str ,
140140 source_prefix : str ,
141141 destination_bucket : str ,
142+ destination_prefix : str ,
142143 job_description : str ,
143144 job_duration : timedelta ,
144145 do_create_transfer_job : Callable [[CreateTransferJobRequest ], T ],
@@ -164,6 +165,7 @@ def create_transfer_job[T](
164165 :param destination_bucket:
165166 :param job_duration: The amount of time the job should take to complete. Longer runs put less
166167 pressure on our buckets.
168+ :param destination_prefix:
167169 :param notification_topic: Specifying a topic will enable automatic run retries on failure.
168170 :param do_create_transfer_job: Injected function which creates the transfer-job.
169171 :param get_current_datetime: Injected function which computes the current datetime.
@@ -177,7 +179,7 @@ def create_transfer_job[T](
177179 status = storage_transfer_v1 .TransferJob .Status .ENABLED ,
178180 transfer_spec = TransferSpec (
179181 gcs_data_source = GcsData (bucket_name = source_bucket , path = source_prefix ),
180- gcs_data_sink = GcsData (bucket_name = destination_bucket ),
182+ gcs_data_sink = GcsData (bucket_name = destination_bucket , path = destination_prefix ),
181183 ),
182184 schedule = Schedule (
183185 schedule_start_date = date_pb2 .Date (
@@ -570,6 +572,7 @@ def export_replay_blob_data[T](
570572 project_id : int ,
571573 gcp_project_id : str ,
572574 destination_bucket : str ,
575+ destination_prefix : str ,
573576 job_duration : timedelta ,
574577 do_create_transfer_job : Callable [[CreateTransferJobRequest ], T ],
575578 pubsub_topic_name : str | None = None ,
@@ -589,6 +592,7 @@ def export_replay_blob_data[T](
589592 source_bucket = source_bucket ,
590593 source_prefix = f"{ retention_days } /{ project_id } " ,
591594 destination_bucket = destination_bucket ,
595+ destination_prefix = destination_prefix ,
592596 notification_topic = pubsub_topic_name ,
593597 job_description = "Session Replay EU Compliance Export" ,
594598 job_duration = job_duration ,
@@ -600,6 +604,7 @@ def export_replay_data(
600604 organization_id : int ,
601605 gcp_project_id : str ,
602606 destination_bucket : str ,
607+ destination_prefix : str ,
603608 blob_export_job_duration : timedelta = EXPORT_JOB_DURATION_DEFAULT ,
604609 database_rows_per_page : int = EXPORT_QUERY_ROWS_PER_PAGE ,
605610 database_pages_per_task : int = EXPORT_QUERY_PAGES_PER_TASK ,
@@ -647,6 +652,7 @@ def export_replay_data(
647652 project_id = project .id ,
648653 gcp_project_id = gcp_project_id ,
649654 destination_bucket = destination_bucket ,
655+ destination_prefix = destination_prefix ,
650656 pubsub_topic_name = pubsub_topic_name ,
651657 source_bucket = source_bucket ,
652658 job_duration = blob_export_job_duration ,
0 commit comments