Integrating with Google BigQuery

To integrate BigQuery with your Reteno account:

  1. Register your account at Google Cloud Platform.
  2. Get a project key.
  3. Create tables in Google BigQuery for importing data to Reteno; tables with data from Reteno will be created automatically after the first export.
ā—ļø

Important

When creating tables in Google BigQuery, use snake_case or camelCase for field names. This will help avoid spaces in names and simplify integration with Reteno.

Examples of correct names:

  • first_name
  • loyalty_card_number
  • orderDate
  1. Create the Reteno connector.

If you already have a project key and BigQuery tables with data for Reteno, you can go directly to the connector settings.

Creating a Project Key

  1. Create a Google Cloud Platform account.
  2. Select a project → APIs & Services → Credentials.
Google Cloud APIs & Services page with the Credentials section highlighted in the left navigation.
  1. Click Create credentials → Service account.
Credentials page with the Create credentials button open, showing the Service account option highlighted.
  1. Enter a service account name and click the Create and continue button.
Create service account page with the Service account name field and Create and continue button highlighted.
  1. Grant the service account the BigQuery Job User role at the project level, then click Continue → Done.
Create service account page with the role selector open and the Done button highlighted.
  1. Create the BigQuery dataset the connector will work with, open it, and grant the same service account the BigQuery Data Owner role on that dataset only.
šŸ“˜

Note

These two roles are all the connector needs. BigQuery Job User at the project level lets it run query jobs, and BigQuery Data Owner granted on a single dataset lets it create and manage the tables inside that dataset without access to the rest of the project. Grant both in the specific Google Cloud project used for this integration rather than at the organization or folder level.

  1. Click the link Manage service accounts on the main page of the Credentials section.
Credentials page with the Manage service accounts link highlighted.
  1. Click on the three dots opposite the created account and select the option Manage keys.
Service accounts page with the three-dot menu open and the Manage keys option highlighted.
  1. Click on the Add key button and select the Create new key option in the Keys section.
Keys tab of a service account with the Add key dropdown open and the Create new key option highlighted.
  1. Select JSON key type and click Create.
Create private key dialog with the JSON key type and Create button highlighted.

The browser will automatically download the key to the download folder.

Connecting BigQuery

Go to your profile → Settings → Connectors → and select Connect BigQuery.

Account dropdown menu with Settings highlighted, and the Connectors page showing the highlighted Connect BigQuery option.

Create connector:

  1. Fill in the Name field.
  2. Upload the key file.
  3. Click Validate connection to test whether the authorization data is correct. You will see a notification if the connection is successful or not. If the connection fails, check the entered data and contact your system administrator if needed.
  4. Set unique contact field: select a table column that contains a unique contact key and Reteno's unique contact key. They should match.
  5. Click Save.
Save

The created connector will be displayed in the Settings → Connectors section. Click the tab with its name to edit the connector’s parameters.

Connectors page listing a created BigQuery connector named dataset.

Now, you can use it for exporting Reteno’s data and for importing data from BigQuery.

šŸ“˜

Note

  • The target BigQuery dataset must already exist before you connect it — Reteno creates the individual tables inside that dataset automatically, but it does not create the dataset itself.
  • The first export includes the history the account already holds, so you don't have to request a separate upload of earlier data. The limit is what the account collected: contact activity goes back up to 90 days and no earlier than the day activity collection was enabled, while the other data sets cover the whole lifetime of the account. Activity from before collection was enabled can't be recovered by any means, including the Get contacts activity API resource.

Did this page help you?