Skip to content

Google BigQuery

Setup instructions
  1. Head to Google Developers Console and create a new project (or select the one you already have).
  2. Go to APIs & Services > Enable APIs & services.
    • Click the button for + ENABLE APIS AND SERVICES
    • In the Search bar, find BigQuery API. Click ENABLE.
  3. Create a Service Account.
  4. Create a service account key.
    • In the Cloud Console, click the email address for the service account that you created.
    • Click Keys.
    • Click Add key, then click Create new key.
    • Click Create. A JSON key file is downloaded to your computer.
    • Click Close.

Parameters

Required parameters are in red and Optional parameters are in blue.



  • dataset, the dataset to write new data to
    if tables do not exist in the project.dataset location already, we'll auto-create them

  • credentials_keyfile, the path to your credentials JSON

  • load_strategy, how to write new data into existing tables
    default: APPEND ( allowed: APPEND, TRUNCATE, UPSERT )

Serverless Requirements

If you're running CS Tools    serverless, you'll want to ensure you install these    python requirements.

🧙 Don't know what this means? It's probably safe to ignore it.

How do I use the Syncer in commands?

CS Tools accepts syncer definitions in either declarative or configuration file form.

Find the copy button to the right of the code block.

Simply write the parameters out alongside the command.

cs_tools tools searchable metadata --syncer "bigquery://project_id=thoughtspot&dataset=cs_tools&credentials_keyfile=/path/to/cs_tools/bigquery/credentials.json" --config dogfood

* when declaring multiple parameters inline, you should wrap the enter value in quotes.

  1. Create a file with the .toml extension.

    syncer-overwrite.toml

    [configuration]
    project_id = "thoughtspot"
    dataset = "cs_tools"
    credentials_keyfile = "/path/to/cs_tools/bigquery/credentials.json"
    load_strategy = "TRUNCATE"
    
    * this is a complete example, not all parameters are required.

  2. Write the filename in your command in place of the parameters.

    cs_tools tools searchable metadata --syncer bigquery://syncer-overwrite.toml --config dogfood