To get started, you need to
- Create a service account in your Google Cloud account
- Grant Bigquery permissions
- Create and save a service account key for the Google Cloud service account
- Give Definite the key
Create a Google Cloud Service Account
- Navigate to the Google Cloud service account management dashboard and select your project.
+ CREATE SERVICE ACCOUNT
- Fill in the service account name field. Ex:
Grant Bigquery Permissions
Navigate to the Google Cloud IAM-Admin console for your project.
+ GRANT ACCESSunder the search box.
Enter the previously created service account name in the New Principals field. Ex:
Assign these roles through the dropdown box for
Select a role
Create And Save the Service Account Key
Navigate to the Google Cloud service account management dashboard and select your project.
Click on the service account you created.
Navigate to the
Create new key→
- This will create and download a JSON key (.json) used by Definite to authenticate as the service account user.
Save the .json key file
Give Definite the Service Account Key
- From the Definite homescreen --> Integrations --> Add Integration --> BigQuery.
- You should see a screen like this where you can paste in your service account key:
You can query BigQuery public datasets. For example:
selectFORMAT_TIMESTAMP('%Y-%m-%d', timestamp) as dt,*FROM `bigquery-public-data.hacker_news.full` as cwhere c.timestamp >= '2022-11-15'limit 100