This documentation page assumes that you already have a SeekTable account. Create your free account by signing up.

Google BigQuery pivot table reports

Google BigQuery can be used as a data source with SQL-compatible database connector and Simba ODBC driver.

There are no any limitations on the dataset size and in this you can get reports by billions-size datasets in the near real-time. This youtube video illustrates how sample 1.3Gb data is aggregated by BigQuery in seconds and displayed as a pivot table by SeekTable.

BigQuery connection setup

Connection String should be a valid connection string for Simba ODBC driver for Google BigQuery; for example:

Driver=Simba ODBC Driver for Google BigQuery;OAuthMechanism=1;RefreshToken=your_google_oauth_refresh_token;Catalog=your_api_project_id;
Catalog The name of your BigQuery project. This project is the default project that the Simba ODBC Driver for Google BigQuery queries against.
RefreshToken The refresh token that you obtain from Google for authorizing access to BigQuery. Section below explains how to generate the token.

How to get a refresh token

If you don't have a refresh token you get it in one of the following ways:

Inferring schema for tables with ARRAY columns

If your table has an ARRAY-type columns and you got an error like Error converting invalid input with source encoding UTF-8 using ICU:

  1. exclude these columns from the Select Query, for example:
    SELECT * except(array_col1, array_col2) FROM some_table
    and save the cube form.
  2. Then go to the cube configuration form; you should see dimensions & measures that are populated automatically.
  3. Change the query to:
    SELECT * FROM some_table
    do NOT check Infer dimensions and measures by dataset. Save the form.

Date-part dimensions calculated with SQL expressions

To define date-part dimensions (date's "year", "month", "day" etc) you may add dimensions defined with an appropriate SQL expression:

  1. add new dimension with Type=Field
  2. fill Name with some unique value: say, "date_column_year"
  3. add one Parameter which should be a date-part BigQuery SQL expression:
    • For year: EXTRACT(YEAR FROM date_column)
    • For month: EXTRACT(MONTH FROM date_column) + Format={0:MMM} (Jan, Feb etc) or {0:MMMM} (January, February etc)
    • For day: EXTRACT(DAY FROM date_column)
    • For day-of-week: EXTRACT(DAYOFWEEK FROM date_column)-1 + Format={0:ddd} (Mon, Tue etc) or {0:dddd} (Monday, Tuesday etc)
    • For quarter: EXTRACT(QUARTER FROM date_column)
    • For week-of-year: EXTRACT(ISOWEEK FROM date_column)

Looking for an embedded solution? Try PivotData microservice which can be seamlessly integrated into any web application for pivot tables generation by Google BigQuery with simple web API.