public abstract static class ConnectionSettings.Builder
Constructors
Builder()
Methods
build()
public abstract ConnectionSettings build()
Creates a ConnectionSettings
object.
Returns
setAllowLargeResults(Boolean allowLargeResults)
public abstract ConnectionSettings.Builder setAllowLargeResults(Boolean allowLargeResults)
Parameter
Name | Description |
allowLargeResults | Boolean
|
Returns
setClustering(Clustering clustering)
public abstract ConnectionSettings.Builder setClustering(Clustering clustering)
Sets the clustering specification for the destination table.
Parameter
Returns
setConnectionProperties(List<ConnectionProperty> connectionProperties)
public abstract ConnectionSettings.Builder setConnectionProperties(List<ConnectionProperty> connectionProperties)
Sets a connection-level property to customize query behavior.
Parameter
Returns
setCreateDisposition(JobInfo.CreateDisposition createDisposition)
public abstract ConnectionSettings.Builder setCreateDisposition(JobInfo.CreateDisposition createDisposition)
Parameter
Returns
setCreateSession(Boolean createSession)
public abstract ConnectionSettings.Builder setCreateSession(Boolean createSession)
Sets whether to create a new session. If true
a random session id will be generated
by BigQuery. If false, runs query with an existing session_id passed in ConnectionProperty,
otherwise runs query in non-session mode."
Parameter
Name | Description |
createSession | Boolean
|
Returns
setDefaultDataset(DatasetId datasetId)
public abstract ConnectionSettings.Builder setDefaultDataset(DatasetId datasetId)
Sets the default dataset. This dataset is used for all unqualified table names used in the
query.
Parameter
Returns
setDestinationEncryptionConfiguration(EncryptionConfiguration destinationEncryptionConfiguration)
public abstract ConnectionSettings.Builder setDestinationEncryptionConfiguration(EncryptionConfiguration destinationEncryptionConfiguration)
Sets the custom encryption configuration (e.g., Cloud KMS keys).
Parameter
Name | Description |
destinationEncryptionConfiguration | EncryptionConfiguration
destinationEncryptionConfiguration or null
for none
|
Returns
setDestinationTable(TableId destinationTable)
public abstract ConnectionSettings.Builder setDestinationTable(TableId destinationTable)
Parameter
Name | Description |
destinationTable | TableId
|
Returns
setFlattenResults(Boolean flattenResults)
public abstract ConnectionSettings.Builder setFlattenResults(Boolean flattenResults)
Parameter
Name | Description |
flattenResults | Boolean
|
Returns
setJobTimeoutMs(Long jobTimeoutMs)
public abstract ConnectionSettings.Builder setJobTimeoutMs(Long jobTimeoutMs)
[Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt
to terminate the job.
Parameter
Name | Description |
jobTimeoutMs | Long
jobTimeoutMs or null for none
|
Returns
setMaxResultPerPage(Integer maxResultPerPage)
public abstract ConnectionSettings.Builder setMaxResultPerPage(Integer maxResultPerPage)
Sets the maximum records per page to be used for pagination. This is used as an input for the
tabledata.list and jobs.getQueryResults RPC calls
Parameter
Name | Description |
maxResultPerPage | Integer
|
Returns
setMaxResults(Long maxResults)
public abstract ConnectionSettings.Builder setMaxResults(Long maxResults)
Sets the maximum number of rows of data to return per page of results. Setting this flag to a
small value such as 1000 and then paging through results might improve reliability when the
query result set is large. In addition to this limit, responses are also limited to 10 MB. By
default, there is no maximum row count, and only the byte limit applies.
Parameter
Name | Description |
maxResults | Long
maxResults or null for none
|
Returns
setMaximumBillingTier(Integer maximumBillingTier)
public abstract ConnectionSettings.Builder setMaximumBillingTier(Integer maximumBillingTier)
Limits the billing tier for this job. Queries that have resource usage beyond this tier will
fail (without incurring a charge). If unspecified, this will be set to your project default.
Parameter
Name | Description |
maximumBillingTier | Integer
maximum billing tier for this job
|
Returns
setMaximumBytesBilled(Long maximumBytesBilled)
public abstract ConnectionSettings.Builder setMaximumBytesBilled(Long maximumBytesBilled)
Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit
will fail (without incurring a charge). If unspecified, this will be set to your project
default.
Parameter
Name | Description |
maximumBytesBilled | Long
maximum bytes billed for this job
|
Returns
setMinResultSize(Integer minResultSize)
public abstract ConnectionSettings.Builder setMinResultSize(Integer minResultSize)
Sets the minimum result size for which the Read API will be enabled
Parameter
Name | Description |
minResultSize | Integer
minResultSize
|
Returns
setNumBufferedRows(Integer numBufferedRows)
public abstract ConnectionSettings.Builder setNumBufferedRows(Integer numBufferedRows)
Sets the number of rows in the buffer (a blocking queue) that query results are consumed
from.
Parameter
Name | Description |
numBufferedRows | Integer
numBufferedRows or null for none
|
Returns
setPriority(QueryJobConfiguration.Priority priority)
public abstract ConnectionSettings.Builder setPriority(QueryJobConfiguration.Priority priority)
Sets a priority for the query. If not specified the priority is assumed to be Priority#INTERACTIVE.
Parameter
Returns
setRangePartitioning(RangePartitioning rangePartitioning)
public abstract ConnectionSettings.Builder setRangePartitioning(RangePartitioning rangePartitioning)
Range partitioning specification for this table. Only one of timePartitioning and
rangePartitioning should be specified.
Parameter
Returns
setRequestTimeout(Long timeoutMs)
public abstract ConnectionSettings.Builder setRequestTimeout(Long timeoutMs)
Sets how long to wait for the query to complete, in milliseconds, before the request times
out and returns. Note that this is only a timeout for the request, not the query. If the
query takes longer to run than the timeout value, the call returns without any results and
with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the
query to complete and read the results. The default value is 10000 milliseconds (10 seconds).
Parameter
Name | Description |
timeoutMs | Long
or null for none
|
Returns
setSchemaUpdateOptions(List<JobInfo.SchemaUpdateOption> schemaUpdateOptions)
public abstract ConnectionSettings.Builder setSchemaUpdateOptions(List<JobInfo.SchemaUpdateOption> schemaUpdateOptions)
[Experimental] Sets options allowing the schema of the destination table to be updated as a
side effect of the query job. Schema update options are supported in two cases: when
writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination
table is a partition of a table, specified by partition decorators. For normal tables,
WRITE_TRUNCATE will always overwrite the schema.
Parameter
Returns
setTableDefinitions(Map<String,ExternalTableDefinition> tableDefinitions)
public abstract ConnectionSettings.Builder setTableDefinitions(Map<String,ExternalTableDefinition> tableDefinitions)
Sets the external tables definitions. If querying external data sources outside of BigQuery,
this value describes the data format, location and other properties of the data sources. By
defining these properties, the data sources can be queried as if they were standard BigQuery
tables.
Parameter
Returns
setTimePartitioning(TimePartitioning timePartitioning)
public abstract ConnectionSettings.Builder setTimePartitioning(TimePartitioning timePartitioning)
Sets the time partitioning specification for the destination table.
Parameter
Returns
public abstract ConnectionSettings.Builder setTotalToPageRowCountRatio(Integer totalToPageRowCountRatio)
Sets a ratio of the total number of records and the records returned in the current page.
This value is checked before calling the Read API
Parameter
Name | Description |
totalToPageRowCountRatio | Integer
totalToPageRowCountRatio
|
Returns
setUseQueryCache(Boolean useQueryCache)
public abstract ConnectionSettings.Builder setUseQueryCache(Boolean useQueryCache)
Parameter
Name | Description |
useQueryCache | Boolean
|
Returns
setUseReadAPI(Boolean useReadAPI)
public abstract ConnectionSettings.Builder setUseReadAPI(Boolean useReadAPI)
Sets useReadAPI flag, enabled by default. Read API will be used if the underlying conditions
are satisfied and this flag is enabled
Parameter
Name | Description |
useReadAPI | Boolean
or true for none
|
Returns
setUserDefinedFunctions(List<UserDefinedFunction> userDefinedFunctions)
public abstract ConnectionSettings.Builder setUserDefinedFunctions(List<UserDefinedFunction> userDefinedFunctions)
Parameter
Returns
setWriteDisposition(JobInfo.WriteDisposition writeDisposition)
public abstract ConnectionSettings.Builder setWriteDisposition(JobInfo.WriteDisposition writeDisposition)
Sets the action that should occur if the destination table already exists.
See Also: Write Disposition
Parameter
Returns