Connecting to BigQuery
PopSQL allows two ways to connect to your BigQuery data warehouse: OAuth and Service Account.
Manage Connectionsin the top center of the app.
New Connectionin the
Manage Connectionsmodal in PopSQL.
Nicknamefor this connection (for your own internal reference).
Type, choose BigQuery.
OAuthwhen asked how you want to connect to BigQuery.
Sign in with Googlebutton. You will be taken to an external page hosted by Google for authentication. Note: the
BigQuery Job UserIAM role is required for whatever Google user you use.
Upon successful authentication, return to PopSQL.
Enter the name of your desired
You'll need to be an owner in your Google Cloud project to create a service account. If you're not, please contact the administrator of your BigQuery database.
Visit the Credentials page in Google Cloud Console
Select your project
Create credentials, and then
Service account key
New service account, name it (ie "PopSQL BigQuery" or your full name), give it the BigQuery Admin role, select JSON, and hit the Create button.
Download the .json file, open it in a text editor, and copy the entire file contents to your clipboard.
Open the PopSQL connections modal, click
New Connection, name it, choose BigQuery as the type, select
Service Accountas connection type, paste your clipboard (the .json file contents) into the Service Account field, and hit Connect.
Once you're connected, try this sample query:
SELECT title FROM `bigquery-public-data.samples.wikipedia` LIMIT 5;
Happy querying! 🍭
Spread the wordTweet