'Move BigQuery Data Transfer Service(DCM) data to another project
I have BigQuery Data Transfer Service for Campaign Manager setup in dataset A in GCP project A. I would like to move this to dataset B located in project B. How can I move the existing data and setup the BigQuery Transfer with any loss of data and duplicates?
Solution 1:[1]
Here's how I migrated the transfer service:
- The transfer service was enabled in the project B.
- Once the data started to arrive at dataset B, the historical data(from the starting till MIN(partition_date)-1) was copied from dataset A to appropriate partitions in dataset B.
- The transfer service in project A was stopped after verifying the partition counts and row counts.
Solution 2:[2]
I'm afraid you would have to:
- Copy the relevant tables from dataset A to dataset B
- Set up the transfer service again for dataset B (assuming it can be done if the tables already exist in the target dataset)
- De-dup the data yourself.
A workaround, that achieve something similar but not exactly what you asked, is to create views of relevant tables in dataset A into dataset B.
By doing so, these views will behave like proper tables in dataset B and you don't have to worry about de-deplication, data loss, and setting up again the data transfer. The downside is that you will have to keep dataset A around.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | marcyb5st |