Skip to main content

Connecting to Google BigQuery

This article explains how to connect Dataedo to Google BigQuery and import metadata - tables & columns.

Prerequisites​

Service Account​

Dataedo connects to Google BigQuery with Service Account. If you don't have one, please read carefully the following Google Cloud docs:

  1. Authentication

  2. Understanding service accounts

During the creation (or modification) of the service account, you need to specify roles which will allow Dataedo to document the BigQuery database. Dataedo reads INFORMATION_SCHEMA views to collect metadata, hence minimum permissions (roles) that the service account needs to have are:

  • BigQuery Metadata Viewer - to read metadata,
  • BigQuery Job User - to run a query that reads metadata.
Create service account

Service account key​

To authenticate to Google BigQuery with a service account, you need a Service Account Key. To get one, you need to find the Service Account resource, open the Service Account that will be used to connect from Dataedo, go to the Keys tab and click Add Key -> Create new Key button. Then select JSON format and download the key.

Create service account key

Cloud Resource Manager API​

In order to document the BigQuery database, Dataedo needs to access the Cloud Resource Manager API which needs to be enabled first. Most likely this feature will be enabled, however, if it is disabled, you can activate it by searching Cloud Resource Manager API in Google Marketplace and then clicking the Enable button.

Cloud Resource Manager API

Importing Metadata in Dataedo Portal​

Entry point​

To start the Metadata Import flow, make sure you have the Connection Manager role. Go to Connections and click Add connection, then pick Google BigQuery from the connector list to open the import wizard described in the following steps.

Add connection

Step 1. Host details​

Provide the name of the Connection, an optional description, and the Project - the ID of the Google Cloud project under which your BigQuery datasets were created, for example company-analytics.

info

A Connection in Dataedo represents a saved configuration for accessing a data source.
It can be reused for future imports and scheduling.

Host details

Advanced settings is optional — you can leave it collapsed and the connection will run on any available agent with the global timeouts. Expand it if you want to restrict the connection to a specific agent or override the task timeouts.

Step 2. Credentials​

Choose credentials from the list of existing ones available for the selected connector, or add new credentials. Google BigQuery uses a Service access key - the JSON key described in Service account key.

Credentials

Step 3. Data Sources​

info

During one import you can read the metadata of up to 20 data sources. You can reuse the same connection to import more sources later.

  • Portal displays the data sources found for the project - in the example, the company-analytics project itself
  • You can use the search box to narrow down results.
  • each selected data source should be given a Display name, which will be visible in Dataedo
Data sources

Step 4. Objects to import​

On the Filter by schemas tab, select the datasets to import - they are listed as schemas - and, within each dataset, the object types: Tables, Views, Procedures, and Functions. Keep Future Schemas selected to also import datasets created after the connection is set up.

Objects to import

Use Advanced filters to include or exclude objects by schema pattern, name pattern, and object type.

Advanced filters

Step 5. Schedule​

Besides Metadata Import, you can also schedule a Data Profiling task. To configure the Metadata Import task:

  • choose the metadata extraction options (Append only, Reimport all included objects)
  • run daily, on selected weekdays, or on specific days of the month
  • choose an exact time of execution
  • Task state:
    • Active - the task will run as scheduled
    • Draft - the task is saved but not executed until you switch it to Active
  • Run Immediately - when checked, the task will also be executed right after you click Create connection
useful tip

Only one source in a metadata import can have Run Immediately selected.

Add Import Metadata task

Once saved, the task appears next to its data source in the schedule list.

Schedule with a defined task
caution

You must configure at least one import task for every data source.
If you skip this, an empty database will be created and no metadata will be imported.


Importing Metadata in Dataedo Desktop​

Add new connection​

To connect to Google BigQuery create new documentation by clicking Add documentation and choosing Database connection.

Add connection

On the Add documentation window choose Google BigQuery:

Google BigQuery Add docs

Connection details​

Provide connection details:

  • Service Access Key - path to Service Account Key. You can open file explorer to browse for the file by clicking the [...] button,
  • Project - select the Google Cloud project under which your BigQuery database was created. You can expand the list of available projects by clicking the [...] button,
  • Dataset - select one or more datasets to document. You can expand the list of datasets by clicking the [...] button.
Google BigQuery connection details

Importing metadata​

When the connection is successful, Dataedo will read objects and show a list of objects found. You can choose which objects to import. You can also use advanced filter to narrow down the list of objects.

BigQuery objects

Confirm the list of objects to import by clicking Next.

The next screen allows you to change the default name of the documentation under which it will be visible in the Dataedo repository.

BigQuery documentation title

Click Import to start the import.

BigQuery import progress

When done, close the import window with the Finish button.

Outcome​

Your database schema has been imported to new documentation in the repository.

BigQuery documentation

Google BigQuery support​

Google BigQuery support details

Dataedo is an end-to-end data governance solution for mid-sized organizations.
Data Lineage • Data Quality • Data Catalog