Skip to main content
Skip table of contents

How to Use Alli Client Credentials to Connect to Google Cloud (BigQuery)

Marketplace provides two environment variables related to Google Cloud which can be used to connect to Google Cloud and big query:

  • ALLI_GOOGLE_CLOUD_CREDENTIALS this is a file path. The file contains credential info that can be passed into google.auth.aws.Credentials

  • ALLI_GOOGLE_CLOUD_PROJECT This is the project name and can be used to in big query connections and table names

Python Example

PY
import os
from google.auth import load_credentials_from_file
from google.cloud import bigquery

credentials, _ = load_credentials_from_file(os.environ['ALLI_GOOGLE_CLOUD_CREDENTIALS'])

bq = bigquery.Client(credentials=credentials, project=os.environ['ALLI_GOOGLE_CLOUD_PROJECT'])

datasets = list(bq.list_datasets())

print(datasets)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.