Class BigQueryConfig Stay organized with collections Save and categorize content based on your preferences.
Page Summary
BigQueryConfig is a configuration object for a native BigQuery connector used with Data Studio.
It is returned from the
getData()function for Data Studio to query BigQuery.Methods available for BigQueryConfig include adding query parameters, building the configuration, printing JSON, setting access token, setting billing project ID, setting the query, and setting the SQL interpretation method.
The
build()method validates the object and formats it for Data Studio, while othersetmethods configure specific aspects of the BigQuery connection and query.
A configuration object for a native BigQuery connector. Return this object fromgetfor Data Studio to query BigQuery for the connector.
constcc=DataStudioApp.createCommunityConnector();constbqConfig=cc.newBigQueryConfig().setBillingProjectId('billingProjectId').setQuery('queryString').setUseStandardSql(true).setAccessToken('accessToken').addQueryParameter('dob',cc.BigQueryParameterType.STRING,'01011990').build();
Methods
| Method | Return type | Brief description |
|---|---|---|
add | Big | Adds a query parameter to thisBig. |
build() | Object | Validates this object and returns it in the format needed by Data Studio. |
print | String | Prints the JSON representation of this object. |
set | Big | Sets the access token of thisBig. |
set | Big | Sets the billing project ID of thisBig. |
set | Big | Sets the SQL query of thisBig. |
set | Big | Determines if the query is interpreted as standard or legacy SQL. |
Detailed documentation
addQueryParameter(name, type, value)
Adds a query parameter to thisBig.
Parameters
| Name | Type | Description |
|---|---|---|
name | String | The parameter name. |
type | Big | The parameter type. |
value | String | The parameter value. |
Return
Big — This object, for chaining.
build()
Validates this object and returns it in the format needed by Data Studio.
Return
Object — The validatedConfig object.
printJson()
Prints the JSON representation of this object. This is for debugging only.
Return
String
setAccessToken(accessToken)
Sets the access token of thisBig.
Parameters
| Name | Type | Description |
|---|---|---|
access | String | The access token to set. |
Return
Big — This object, for chaining.
setBillingProjectId(billingProjectId)
Sets the billing project ID of thisBig.
Parameters
| Name | Type | Description |
|---|---|---|
billing | String | The billing project ID to set. |
Return
Big — This object, for chaining.
setQuery(query)
Sets the SQL query of thisBig.
Parameters
| Name | Type | Description |
|---|---|---|
query | String | The query to set. |
Return
Big — This object, for chaining.
setUseStandardSql(useStandardSql)
Determines if the query is interpreted as standard or legacy SQL.
Parameters
| Name | Type | Description |
|---|---|---|
use | Boolean | Iftrue, the query is interpreted as standard SQL. Iffalse, the query is interpreted as legacy SQL. |
Return
Big — This object, for chaining.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-11 UTC.