Configuring the High-Throughput API

You can configure the connector to use the High-Throughput API to handle large result sets more efficiently. For more information about the High-Throughput API, see High-Throughput API.

To configure the High-Throughput API:

  1. Make sure that your Google BigQuery project has the Storage API enabled. For more information about the Storage API, see "BigQuery Storage API Overview" in the Google BigQuery documentation: https://cloud.google.com/bigquery/docs/reference/storage/.
  2. Note:

    If the application running the connector has been built with an RPATH, then you must either include the connector directory in that RPATH, or adjust your LD_LIBRARY_PATH to include the connector directory.

  3. In the odbc.ini file, if you are using Legacy SQL (the SQLDialect property is set to 0), then set the AllowLargeResults property to 1.
  4. To specify the dataset that stores temporary tables for large result sets and result sets returned by the High-Throughput API, do one of the following:
    • To use the default dataset with the ID _bqodbc_temp_tables, set the UseDefaultLargeResultsDataset property to 1.
    • Or, to specify a different dataset, set the UseDefaultLargeResultsDataset property to 0 and set the LargeResultsDataSetId property to the ID of the BigQuery dataset that you want to use.

    Note:

    If the dataset does not exist and the data store specifies the US region, the connector creates the dataset.

  5. Set the EnableHTAPI property to 1.
  6. Set the HTAPI_MinResultsSize property to the minimum number of table rows required to activate the High-Throughput API.
  7. Set the HTAPI_MinActivationRatio property to the minimum ratio of total rows to rows in the first page required to activate reading through the High-Throughput API.
  8. Note:

    If this value is set to 0, then the connector uses the High-Throughput API for all query results that meet the minimum results size specified by the HTAPI_MinResultsSize property.

The connector uses the BigQuery High-Throughput API instead of the REST API for requests where both:

  • the number of table rows in your query results exceeds the HTAPI_MinResultsSize value;
  • and the number of pages in the results exceeds the HTAPI_MinActivationRatio value.