For the complete documentation index, see llms.txt. This page is also available as Markdown.

BigQuery

Overview

When exposing your data to mediarithmics we recommend the following structure :

  • A BigQuery project that contains :

    • One or multiple datasets with data you want to expose to mediarithmics with read-only access

    • 2 datasets specifically created for mediarithmics usage with read and write access.

You do not have to expose all tables/views in a given dataset. Refer to this section for more information

This page describes how to set up a service account with such access.

Steps

  1. Enable the Cloud Resource Manager API

  2. Create a service account with the right set of permissions

  3. Create dedicated datasets for mediarithmics usage

  4. Generate a credentials JSON file

1. Enable the Cloud Resource Manager API

  • In the Google Cloud Console, navigate to the APIs & Services > Library page.

  • In the search bar, type "Cloud Resource Manager API".

  • Click on the search result for the Cloud Resource Manager API and click the Enable button

2. Service account creation and permissions

We recommend using a dedicated service account with the appropriate set of permissions.

To create a service account follow these steps :

  • Go to IAM & Admin>Service Accounts

  • Select you project

  • Click on “Create service account”

  • Input the necessary informations : service account name, service account id (automatically generated), description. Click on “Create and continue”

Grant access

  • We recommend giving the service account Read only access to your data by giving the following roles at the project level :

    • bigquery.jobUser

    • bigquery.dataViewer

Grant limited access

If you do not want to give the bigquery.dataViewer role at the project level, you can assign it only to specific datasets, tables or views in your project. If you do that then you should add the following permissions at the project level :

  • bigquery.datasets.get

  • bigquery.tables.list

  • bigquery.tables.get

To assign these customs permissions you should create a custom role than carries the bigquery.jobUser role and the bigquery.datasets.get bigquery.tables.list bigquery.tables.get permissions.

If the bigquery.dataViewer role is even too much, you can assign the bigquery.tables.getData permission at a table level only.

3. Create dedicated datasets for mediarithmics usage

We recommend to create two dedicated datasets for mediarithmics' usage.

  • mics_workspace dataset that holds all temporary tables created while syncing with your warehouse

  • mics_output dataset that holds all output tables — the clean results of daily processing, ready for consumption

Note that the tables in mics_output are not meant to be interface tables : their schema could change with successive releases. If you need a specific stable table schema to expose it to other tools, please contact your account manager.

Nota bene : If you wish to use a synchronization strategy that handles updates and deletes of data, you will need a working dataset (i.e. the mics_workspace dataset)

The service account you created in step 3, should have the following role on the mics_output and mics_workspace datasets

  • bigquery.dataEditor

4. Generate a credentials JSON file

To export a credentials JSON file follow these steps :

  • Select JSON then “Create”

  • The key is automatically downloaded

Last updated

Was this helpful?