Monitor BI Engine

BigQuery BI Engine works with Google Cloud services to help monitor and troubleshoot BI Engine use.

Cloud Monitoring

BigQuery BI Engine integrates with Cloud Monitoring so you can monitor aggregated BI Engine use in aggregate and configure alerts. For information on using Monitoring to create dashboards for your BI Engine metrics, see Creating charts in the Monitoring documentation.

The following metrics are provided for BigQuery BI Engine:

Resource Metric Details
BigQuery Project Reservation Total Bytes Total capacity allocated to one Google Cloud project
BigQuery Project Reservation Used Bytes Total capacity used in one Google Cloud project
BigQuery Project BI Engine Top Tables Cached Bytes Cache usage per table. This metric displays the top N tables per region report usage.

The following metrics are also provided by BI Engine when using Looker Studio.

Resource Metric Details
BigQuery BI Engine Model Inflight Requests Number of concurrent requests to a model (max within sample period)
BigQuery BI Engine Model Request Count Total number of requests that were issued to a model
BigQuery BI Engine Model Request Execution Times Median query execution latency

You can use Cloud Monitoring to view the traffic for Looker Studio data sources that were cached by BI Engine. When you view metrics for BI Engine in a Cloud Monitoring widget, the model ID is displayed as the dimension of the metric. To find the model ID of your BigQuery BI Engine Model, open the Looker Studio model in a web browser. The model ID is the portion of the URL following datasources/. For example, https://lookerstudio.google.com/c/u/0/datasources/<model_id>.

For a complete list of available Google Cloud metrics, see Google Cloud metrics.

Looker Studio BigQuery Native Integration doesn't provide per-model metrics. Instead exposes data source and report IDs in the INFORMATION_SCHEMA tables with BigQuery API monitoring.

Query statistics for BI Engine

This section explains how to find query statistics to help monitor, diagnose, and troubleshoot BI Engine use.

BI Engine acceleration modes

With BI Engine acceleration enabled, your query can run in any one of these four modes:

BI_ENGINE_DISABLED
BI Engine disabled the acceleration. biEngineReasons specifies a more detailed reason. The query was run using the BigQuery execution engine.
PARTIAL_INPUT
Part of the query input was accelerated using BI Engine. As described in Query optimization and acceleration, a query plan is generally broken down into multiple input stages. BI Engine supports the common types of subquery patterns that are typically used in dashboarding. If the query consists of multiple input stages, only a few of which fall under the supported use cases, then BI Engine runs the unsupported stages using the normal BigQuery engine without acceleration. In this situation, BI Engine returns a PARTIAL acceleration code, and uses biEngineReasons to populate the reason for not accelerating other input stages.
 FULL_INPUT
 
All input stages of the query were accelerated using BI Engine.
 FULL_QUERY
 
The entire query were accelerated using BI Engine.

BigQuery API job statistics

Detailed statistics on BI Engine are available through the BigQuery API.

To fetch the statistics associated with BI Engine accelerated queries, run the following bq command-line tool command:

bq show --format=prettyjson -j job_id

If the project is enabled for BI Engine acceleration, then the output produces a new field, biEngineStatistics. Here is a sample job report:

 "statistics": {
    "creationTime": "1602175128902",
    "endTime": "1602175130700",
    "query": {
      "biEngineStatistics": {
        "biEngineMode": "DISABLED",
        "biEngineReasons": [
          {
            "code": "UNSUPPORTED_SQL_TEXT",
            "message": "Detected unsupported join type"
          }
        ]
      },

For more information about the BiEngineStatistics field, see the Job reference.

BigQuery INFORMATION_SCHEMA statistics

BI Engine acceleration statistics are included in the BigQuery INFORMATION_SCHEMA views as part of the INFORMATION_SCHEMA.JOBS_BY_* views in the bi_engine_statistics column. For example, this query returns the bi_engine_statistics for all of the current projects' jobs for the last 24 hours:

SELECT
  creation_time,
  job_id,
  bi_engine_statistics
FROM
  `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
WHERE
  creation_time BETWEEN TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY)
  AND CURRENT_TIMESTAMP()
  AND job_type = "QUERY"

Use the following format to specify regionality for the project-id, region, and views in the INFORMATION_SCHEMA view:

`PROJECT_ID`.`region-REGION_NAME`.INFORMATION_SCHEMA.VIEW

Cloud Logging

You can view log information about BI Engine by viewing it on the Cloud Logging page of the Google Cloud console. How you view log information for BI Engine depends upon the tool that is querying the data:

  • For Looker Studio queries without Looker Studio Native Integration enabled: You can view log information on the Cloud Logging page with a payload of protoPayload.serviceName="bigquerybiengine.googleapis.com".
  • For all other traffic: You can view log information on the Cloud Logging page with a payload of protoPayload.serviceName="bigquery.googleapis.com".

What's next