Configuring the High-Throughput API
You can configure the driver 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:
- 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/.
- Make sure that the High-Throughput API library,
BigQueryHTAPI_sb[Bitness].dll, is in the same directory as the driver.
- To access the DSN that you want to configure the High-Throughput API for, open the ODBC Data Source Administrator where you created the DSN, then select the DSN, then click Configure.
- Choose one:
- To verify the server using the trusted CA certificates from a specific
.pem file, specify the full path to the file in the Trusted Certificates field and leave the Use System Trust Store check box cleared.
- Or, to use the trusted CA certificates
.pem file that is installed with the driver, leave the default value in the Trusted Certificates field, and leave the Use System Trust Store check box cleared.
Click Advanced Options.
If you are using Legacy SQL (the Language Dialect drop-down list is set to Legacy SQL), then make sure that the Allow Large Result Sets check box is selected.
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:
Do not select the Use System Trust Store check box. The High-Throughput API is not compatible with the Windows Trust Store.
- To use the default dataset with the ID _bqodbc_temp_tables, select the Use Default _bqodbc_temp_tables Large Results Dataset check box.
- Or, to specify a different dataset, clear the Use Default _bqodbc_temp_tables Large Results Dataset check box and, in the Dataset Name For Large Result Sets field, type the ID of the BigQuery dataset that you want to use.
Select the Enable High-Throughput API check box.
In the Minimum Query Results Size for HTAPI field, specify the minimum number of table rows required to activate the High-Throughput API.
In the Ratio of Results to Rows Per Block field, specify the minimum ratio of total rows to rows in the first page required to activate reading through the High-Throughput API.
- If the dataset does not exist and the data store specifies the US region, the driver creates the dataset.
- These options are only available if the driver is configured to use large result sets.
To save your settings and close the Advanced Options dialog box, click OK.
If this value is set to 0, then the driver uses the High-Throughput API for all query results that meet the minimum results size specified by Minimum Query Results Size for HTAPI.
The driver now 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 Minimum Query Results Size for HTAPI number;
- and the number of pages in the results exceeds the Ratio of Results to Rows Per Block value.