This guide explains how to connect Genesis to Google BigQuery using service account authentication.
Go to Google Cloud Console
Access the concole here
Selecting/Creating Your Project
To select or create your project, note your PROJECT_ID (in all lower case)
Navigate To Service Accounts
Navigate to “IAM & Admin” > “Service Accounts”
Creating A Service Account
Click “Create Service Account”
Fill In The Details
Fill in the required details:
Name: (e.g., “genesis-bigquery-sa”)
Description: Optional
Grant The Following Roles
BigQuery Data Viewer
BigQuery Job User
BigQuery User
Creating And Downloading The JSON Key File
Go to the “Keys” tab
Click “Add Key” > “Create new key”
Choose JSON format
NOTE: The downloaded key file will contain your service account credentials including project_id, private_key, client_email and other necessary authentication details.
Before connecting, set the GOOGLE_APPLICATION_CREDENTIALS
environment variable to your key file path
Reference Example:
IMPORTANT: Make sure you set this before running the Genesis server and set it in the same terminal window where you will be running Genesis.
In the /database_demos/bigquery folder that gets installed with Genesis, you can find an additional readme and a small Python program that can be used as a test harness to confirm that your BigQuery connection is working. You can use this if you have any issues connecting to BigQuery with the procedure below.
Tell Eve to add the BigQuery connection using this format.
Make sure your lowercase is in all lowercase.
Copy the prompt below to follow along
Reference Example:
Example Used:
Eve adds a connection to BigQuery
After setting up the connection, verify it on the Database Connections tab in the Genesis GUI.
my_bigquery and other databases connected appear here
Copy the prompt below to follow along
Eve listing the Project ID and Schema Names visible in the connection
You can harvest specific datasets by asking Eve to add all visible schemas, or you can list specific schemas.
Copy the prompt below to follow along
Eve adding my_bigquery to the harvest
After a few minutes, you can see results of the harvest on the Config / Harvester Summary page in the Genesis GUI.
Harvester Status is where you can see all of the data sources being harvested
In this case, there is only one table in one of these datasets, called random_numbers.
Let’s ask Eve to search for it.
Copy the prompt below to follow along
Using the SearchMetadata tool she can now find this table and knows where it is located
You also have the option to remove the connection.
NOTE: This will also remove related harvest information
Authentication Fails
Verify the key file path is correct
Ensure environment variable is properly set
Check if the service account key is valid
Could Not Automatically Determine Credentials
Environment variable not set correctly
Key file not accessible or corrupted
Permission Denied
Check if all required IAM roles are granted
Verify the service account has the necessary permissions
Ensure project access is enabled
Project Not Found
Confirm project ID is correct
Verify service account has access to the project
Query Fails
Validate dataset and table permissions
Check SQL syntax and dataset references
Can't Find Data
This guide explains how to connect Genesis to Google BigQuery using service account authentication.
Go to Google Cloud Console
Access the concole here
Selecting/Creating Your Project
To select or create your project, note your PROJECT_ID (in all lower case)
Navigate To Service Accounts
Navigate to “IAM & Admin” > “Service Accounts”
Creating A Service Account
Click “Create Service Account”
Fill In The Details
Fill in the required details:
Name: (e.g., “genesis-bigquery-sa”)
Description: Optional
Grant The Following Roles
BigQuery Data Viewer
BigQuery Job User
BigQuery User
Creating And Downloading The JSON Key File
Go to the “Keys” tab
Click “Add Key” > “Create new key”
Choose JSON format
NOTE: The downloaded key file will contain your service account credentials including project_id, private_key, client_email and other necessary authentication details.
Before connecting, set the GOOGLE_APPLICATION_CREDENTIALS
environment variable to your key file path
Reference Example:
IMPORTANT: Make sure you set this before running the Genesis server and set it in the same terminal window where you will be running Genesis.
In the /database_demos/bigquery folder that gets installed with Genesis, you can find an additional readme and a small Python program that can be used as a test harness to confirm that your BigQuery connection is working. You can use this if you have any issues connecting to BigQuery with the procedure below.
Tell Eve to add the BigQuery connection using this format.
Make sure your lowercase is in all lowercase.
Copy the prompt below to follow along
Reference Example:
Example Used:
Eve adds a connection to BigQuery
After setting up the connection, verify it on the Database Connections tab in the Genesis GUI.
my_bigquery and other databases connected appear here
Copy the prompt below to follow along
Eve listing the Project ID and Schema Names visible in the connection
You can harvest specific datasets by asking Eve to add all visible schemas, or you can list specific schemas.
Copy the prompt below to follow along
Eve adding my_bigquery to the harvest
After a few minutes, you can see results of the harvest on the Config / Harvester Summary page in the Genesis GUI.
Harvester Status is where you can see all of the data sources being harvested
In this case, there is only one table in one of these datasets, called random_numbers.
Let’s ask Eve to search for it.
Copy the prompt below to follow along
Using the SearchMetadata tool she can now find this table and knows where it is located
You also have the option to remove the connection.
NOTE: This will also remove related harvest information
Authentication Fails
Verify the key file path is correct
Ensure environment variable is properly set
Check if the service account key is valid
Could Not Automatically Determine Credentials
Environment variable not set correctly
Key file not accessible or corrupted
Permission Denied
Check if all required IAM roles are granted
Verify the service account has the necessary permissions
Ensure project access is enabled
Project Not Found
Confirm project ID is correct
Verify service account has access to the project
Query Fails
Validate dataset and table permissions
Check SQL syntax and dataset references
Can't Find Data