Our recent redesign simplifies the data transfer experience by combining raw and modelled data sources into a single object - data feeds.
If you see Data Feeds in the left navigation sidebar, go to this article.
These new features are being released gradually. If you don't see them in your account yet - no worries - they’re coming soon!
Ready to visualize and track your data that's stored in Google BigQuery? Get started by setting up a connection between PowerMetrics and your Google BigQuery account and adding one (or more) data sources.
When you're finished adding Google BigQuery data sources, you'll use them to power your custom metrics.
This article includes:
- Connecting PowerMetrics to your Google BigQuery account
- Adding a Google BigQuery data source
- More about Google BigQuery's API and queries
- Creating Google BigQuery custom metrics
Notes:
- When you create a Google BigQuery data source you can either choose a pre-built data source or, if the pre-built options don't include what you're looking for, create a custom one.
- If you choose to create a custom Google BigQuery data source (instead of a pre-built one), you first need to create an SQL query using the Google BigQuery Query editor. You'll copy and paste that query into Klipfolio when choosing the data to retrieve for your data source.
Connecting PowerMetrics to your Google BigQuery account
To retrieve your data and visualize it as custom metrics, you first need to connect PowerMetrics to your Google BigQuery account.
Here are a couple things to note:
Your data is safe with us. The first time you connect your Google BigQuery account to PowerMetrics, you'll be prompted to enter your Google login credentials and give permission to allow access to the data within your Google account. We are serious about protecting your data privacy.
Managing your connections. By default, your connection name looks like this: yourname@Google<date and time created>. You can modify the default connection name when you create a new connection or from your list of connections, accessed by clicking your Account Name (located at the bottom of the left navigation sidebar) and selecting Account > Connected Accounts or by clicking the button in the left navigation sidebar and selecting Connections. Each time you connect to Google BigQuery, you can use the same account (or switch to a different account if needed). If you have trouble accessing an existing connection, your OAuth token may have expired. If that happens to you, go here for help.
Adding a Google BigQuery data source
To add a Google BigQuery data source:
- In the left navigation sidebar, click your Account Name > Data Sources.
- Click the Create a New Data Source button.
- On the Where is your data? page, select Google BigQuery. (See below.)
- Select a pre-built or custom connection to use for your data source.
- If this is your first time connecting to Google BigQuery:
- Click Connect an account. Enter your Google login credentials and click Next. If prompted, click Allow to enable Klipfolio to securely access your Google Big Query data. Click Continue.
- If you've connected to Google BigQuery before:
- Select an existing connection from the drop-down list and click Continue.
- On the Configure your connection page:
- If you selected the List of Projects pre-built option:
Click Get data.
- If you selected the Sample Query - Life Expectancy by Country pre-built option:
Select a Project from the drop-down menu (or, optionally, manually enter the Project name/ID in the text field).
At Request Option, select either BigQuery SQL or Raw data (JSON), depending on the desired output format.
Click Get data.
- If you selected Create a custom Google BigQuery data source:
Select a Project from the drop-down menu (or, optionally, manually enter the Project name/ID in the text field).
At Request Option, select BigQuery SQL, paste the SQL query you copied from the Google BigQuery Query Editor into the SQL Query text box.
Note: Be sure to include #standardSQL
as the first line in your query, otherwise you may receive a date format error.
Click Get data.
For tips on working with the Google BigQuery API, see "More about Google BigQuery's API and queries".
The image below displays a Google BigQuery SQL query and its results in Klipfolio:
- Ensure this is the data you're looking for, then click Continue.
- On the Verify your data page (the modeller) you can make modifications to your data if desired. Learn about modelling data sources.
- When you’re done making changes, click Save and continue to save your modelled data source.
Note: To ensure your data source continues to update and refresh correctly, after saving, don't change its name or ID.
The modelled data source is added to your account and is ready to use for custom metrics. To see a list of all your data sources, click your Account Name > Data Sources in the left navigation sidebar.
More about Google BigQuery's API and queries
Klipfolio connects to hundreds of services in the cloud that have a REST API. If you take the time to learn your service’s API to create queries for the data you want, your possibilities are endless. Here’s a quick overview video on APIs and Klipfolio:
If you need assistance using APIs, enlist a data analyst or developer.
See the reference table below for API related information and sample queries.
API Documentation | Google BigQuery API documentation |
Authentication Method |
OAuth Token Authentication |
Response Format | CSV or JSON |
Sample Queries |
Life Expectancy by Country in Raw data (query in JSON format):
|
Creating Google BigQuery custom metrics
Now that you've created a Google BigQuery data source, you can return to it and use it to make custom metrics. A single data source can be used to create a single or multiple custom metrics.
To create a Google BigQuery custom metric:
- Open your list of data sources by clicking your Account name > Data Sources.
- Select the modelled Google BigQuery data source you want to use for your custom metric.
- On its details page, click Create metrics.
- On the Create a custom metric page, choose the desired metric value, segmentation, date & time, data shape, and display settings for your metric. If you need help, go here to learn more.
- Click Save.
Your new metric is added to your list of metrics (accessed by clicking Metrics in the left navigation sidebar) and is ready to add to a dashboard. Learn more about dashboards.