Skip to main content

BigQuery

Connect with your bigquery servers via the official Node.js Driver.

Installation

  1. Install package

    npm i @vulcan-sql/extension-driver-bq
    info

    If you run VulcanSQL with Docker, you should use the command vulcan-install @vulcan-sql/extension-driver-bq instead.

  2. Update vulcan.yaml, and enable the extension.

    extensions:
    ...
    bq: '@vulcan-sql/extension-driver-bq' # Add this line
  3. Create a new profile in profiles.yaml or in your profile files. For example:

    ℹ You can choose one from keyFilename or credentials to use. For details, please refer to here

wish keyFilename:

- name: bq # profile name
type: bq
connection:
location: ''
projectId: 'your-project-id'
keyFilename: '/path/to/keyfile.json'
allow: '*'

wish credential:

- name: bq # profile name
type: bq
connection:
location: US
projectId: 'your-project-id'
credential:
client_email: vulcan@projectId.iam.gserviceaccount.com
private_key: '-----BEGIN PRIVATE KEY----- XXXXX -----END PRIVATE KEY-----\n'
allow: '*'

Connection Configuration

Please check Interface BigQueryOptions and Google BigQuery: Node.js Client for further information.

NameRequiredDefaultDescription
locationNUSLocation must match that of the dataset(s) referenced in the query.
projectIdNThe project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which [supports](https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application Application Default Credentials), your project ID will be detected.
keyFilenameNFull path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option above is not necessary. NOTE: .pem and .p12 require you to specify the email option as well.
credentialsNCredentials object.
credentials.client_emailNYour service account.
credentials.private_keyNYour service account's private key.