Use BigQuery for synthetic data

To use BigQuery as a data source or destination for your synthetic data, you need to create a BigQuery connector.

Prerequisites

Create and download a JSON key file for a Google Cloud service account.

Recommendations

If you plan to use BigQuery as both a data source and a destination, we recommend the following best practices.

  • Store original (production) and synthetic data in separate Google Cloud projects.
  • Create two Google Cloud service accounts with specific permissions.
    💡
    For more information, see Control access to resources with IAM in the BigQuery documentation.
    - One service account should have the Viewer role in the project containing production data. - The other service account should have the Editor role in the project where you deliver synthetic data.
  • Create separate BigQuery connectors for the source and destination
    • For the source connector, use the account key with the Viewer role for your production data project.
    • For the destination connector, use the account key with the Editor role for your synthetic data project.

Download a Google Cloud service account key

  1. In Google Cloud BigQuery, open the main sidebar menu and select APIs & Services > Enabled APIs & services. Google Cloud BigQuery - Select APIs and Services > Enabled APIs and services
  2. From the sidebar, select Credentials. Google Cloud BigQuery - Select Credentials
  3. Open your service account.
  4. Select the KEYS tab.
  5. Click ADD KEY and select Create new key. Google Cloud BigQuery - Click Add key and select New key
  6. In the prompt, select JSON and click Create.

Create a BigQuery connector

Create a new BigQuery connector from the Connectors page.

Steps

  1. From the Connectors page, select Google BigQuery under the Connect your data header.
  2. On the New connector modal, configure the connector.
FieldDescription
NameEnter a name that you can distinguish from other connectors.
Access typeSelect whether you want to use the connector as a source or destination.
Key fileYour BigQuery key file.
  1. Click Save to save your new BigQuery connector.
    • MOSTLY AI tests the connection. If you see an error, check the connection details, update them, and click Save again.

    • You can click Save anyway to save the connector and disregard any errors.

What’s next

Depending on whether you created a source or a destination connector, you can use the connector as: