Skip to main content

Onboard BigQuery Resources

This guide explains how to import existing BigQuery resources from a Google Cloud Platform (GCP) project into your Datoria workspace and generate TypeScript definitions for them.

Prerequisites

Initialize a Workspace

If you do not already have a configured workspace, open a terminal and run:

datoria workspace init

This command sets up a new workspace where your imported resources will be stored.

Import BigQuery Resources

From inside your workspace folder, run the following command to import resources from one or more BigQuery datasets:

datoria workspace schema-import bq my-gcp-project.my-dataset-1 my-gcp-project.my-dataset-2

What this command does:

  • Imports all resources from the specified BigQuery datasets into your local workspace.
  • Overwrites existing files if resources of the same name already exist.

Note: To place the imported resources inside a specific folder within your workspace, use the --subdir option:

datoria workspace schema-import bq my-gcp-project.my-dataset --subdir=my/path

Modify Your Imported Resources

After the import completes, you can find your resources in the designated folder within the workspace. You can then:

  • Adjust resource to your needs
  • Rename or reorganize files
  • Add transformation jobs