BigQuery cost connection
IP RESTRICTIONS
Make sure to allow traffic from one of the Paradime IPs in your firewall depending on the data location selected.
👉 See also: Paradime IP addresses.
BigQuery setup guide
1. Creating a Service Account User in BigQuery
Follow these steps to create a new service account user for Paradime and grant the required permissions at the project level:
Go to Google Cloud Console and navigate to IAM & Admin:
Select your project from the project selector at the top.
Go to the "IAM & Admin" section.
Create Service Account:
Click on "Service Accounts".
Click "Create Service Account".
Enter the Service Account name (e.g.,
paradime-radar-user
).Click "Create and Continue".
Assign Roles:
Assign the necessary roles to the service account:
BigQuery Resource Viewer
BigQuery Job User
Complete and Save:
Click "Done" after assigning the roles.
The service account will now be created with the assigned permissions.
Generate Key:
Go to the "Keys" tab and click "Add Key" -> "Create New Key".
Choose JSON format and save the key file securely. (We will need this later to connect BigQuery to Paradime.)
2. Create the BigQuery Dataset
Make sure to name the BigQuery Dataset as paradime_cost_analytics
To set up your BigQuery Project for Paradime, follow these steps:
Go to Google Cloud Console, navigate to BigQuery and select your project.
Create a Dataset:
Name:
paradime_cost_analytics
Select the appropriate Dataset region (this will be needed for the Paradime connection setup).
Grant Access:
Assign the
BigQuery User
andBigQuery Data Editor
roles to the service account user created previously, ensuring these permissions are at the Dataset level.
3. Create and configure a GCS Bucket
Leave the rest of the Bucket configuration using the default options unless required by your organization. Ensure the GCS Bucket region is the same as the Dataset region.
Navigate to Cloud Storage and select Buckets
Click "Create".
Name your GCS bucket (e.g.,
paradime-bucket
).Select your Bucket region (e.g.,
US
).Click on "Create" to complete creating your GCS Bucket.
Set lifecycle policy
Go to the "Lifecycle" tab for your GCS Bucket.
Select "Add Rule" -> "Delete Object" action.
Set "Age" to 2 days and click "Create" to set the policy.
Grant the Paradime service account user access to the GCS Bucket
Go to the "Permissions" tab for your GCS Bucket.
Add the Paradime Service Account user email as a "New Principal" and assign the
Storage Admin
role.
4. dbt™️ project setup guide
To enable Paradime to enrich your BigQuery queries with additional metadata you will need to create a new dbt™️ macro called get_query_comment.sql
in the macros folder of your project.
Create the Macro (
get_query_comment.sql
)
Update your dbt_project.yml file
This step ensures that with each dbt™️ run, the query comment is appended to the query running in BigQuery.
5. Configure Cost connection in Paradime
From the Account Settings page of your Paradime workspace, add your new BigQuery Cost connection using the following details:
BigQuery Service Account JSON
BigQuery Project IDs
Dataset Location for the Dataset used by Paradime
GCS Bucket Name used by Paradime
If connecting multiple project, make sure to use commas and no spaces between each BigQuery Project ID.
✅ dev-project,staging-project,production-project
❌ dev-project, staging-project, production-project
Last updated