class monad.ui.config.BigqueryConfig
monad.ui.config.BigqueryConfigDefines the location of the data source in Google BigQuery.
from monad.ui.config import BigqueryConfig
from pathlib import Path
BigqueryConfig(filename= "path/to/your/file.json")| Parameters |
|---|
filename: pathlib.Path
Path to the service account JSON file.
To connect BaseModel to BigQuery, you need a Google Cloud service account key file in JSON format. This file contains credentials that authorize secure, programmatic access to your BigQuery project.
You can generate this file in the Google Cloud Console by creating a service account, assigning the necessary BigQuery roles, and downloading the key as a JSON file.
Below is a sample structure of the file:
{
"type": "service_account",
"project_id": "your-project-id",
"private_key_id": "your-private-key-id",
"private_key": "-----BEGIN PRIVATE KEY-----\nYOUR-PRIVATE-KEY\n-----END PRIVATE KEY-----\n",
"client_email": "[email protected]",
"client_id": "your-client-id",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-service-account%40your-project-id.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}project_id: str | None
Default value: None
Overrides the Google Cloud project ID defined in the service account JSON file. Use this if the BigQuery project you want to use for querying or computation is different from the one the service account belongs to.
