public abstract static class ConnectionSettings.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract ConnectionSettings |
build()
Creates a
ConnectionSettings object. |
abstract ConnectionSettings.Builder |
setAllowLargeResults(Boolean allowLargeResults)
Sets whether the job is enabled to create arbitrarily large results.
|
abstract ConnectionSettings.Builder |
setClustering(Clustering clustering)
Sets the clustering specification for the destination table.
|
abstract ConnectionSettings.Builder |
setConnectionProperties(List<ConnectionProperty> connectionProperties)
Sets a connection-level property to customize query behavior.
|
abstract ConnectionSettings.Builder |
setCreateDisposition(JobInfo.CreateDisposition createDisposition)
Sets whether the job is allowed to create tables.
|
abstract ConnectionSettings.Builder |
setCreateSession(Boolean createSession)
Sets whether to create a new session.
|
abstract ConnectionSettings.Builder |
setDefaultDataset(DatasetId datasetId)
Sets the default dataset.
|
abstract ConnectionSettings.Builder |
setDestinationEncryptionConfiguration(EncryptionConfiguration destinationEncryptionConfiguration)
Sets the custom encryption configuration (e.g., Cloud KMS keys).
|
abstract ConnectionSettings.Builder |
setDestinationTable(TableId destinationTable)
Sets the table where to put query results.
|
abstract ConnectionSettings.Builder |
setFlattenResults(Boolean flattenResults)
Sets whether nested and repeated fields should be flattened.
|
abstract ConnectionSettings.Builder |
setJobTimeoutMs(Long jobTimeoutMs)
[Optional] Job timeout in milliseconds.
|
abstract ConnectionSettings.Builder |
setMaximumBillingTier(Integer maximumBillingTier)
Limits the billing tier for this job.
|
abstract ConnectionSettings.Builder |
setMaximumBytesBilled(Long maximumBytesBilled)
Limits the bytes billed for this job.
|
abstract ConnectionSettings.Builder |
setMaxResultPerPage(Integer maxResultPerPage)
Sets the maximum records per page to be used for pagination.
|
abstract ConnectionSettings.Builder |
setMaxResults(Long maxResults)
Sets the maximum number of rows of data to return per page of results.
|
abstract ConnectionSettings.Builder |
setMinResultSize(Integer minResultSize)
Sets the minimum result size for which the Read API will be enabled
|
abstract ConnectionSettings.Builder |
setNumBufferedRows(Integer numBufferedRows)
Sets the number of rows in the buffer (a blocking queue) that query results are consumed
from.
|
abstract ConnectionSettings.Builder |
setPriority(QueryJobConfiguration.Priority priority)
Sets a priority for the query.
|
abstract ConnectionSettings.Builder |
setRangePartitioning(RangePartitioning rangePartitioning)
Range partitioning specification for this table.
|
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.
|
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.
|
abstract ConnectionSettings.Builder |
setTableDefinitions(Map<String,ExternalTableDefinition> tableDefinitions)
Sets the external tables definitions.
|
abstract ConnectionSettings.Builder |
setTimePartitioning(TimePartitioning timePartitioning)
Sets the time partitioning specification for the destination table.
|
abstract ConnectionSettings.Builder |
setTotalToPageRowCountRatio(Integer totalToPageRowCountRatio)
Sets a ratio of the total number of records and the records returned in the current page.
|
abstract ConnectionSettings.Builder |
setUseQueryCache(Boolean useQueryCache)
Sets whether to look for the result in the query cache.
|
abstract ConnectionSettings.Builder |
setUserDefinedFunctions(List<UserDefinedFunction> userDefinedFunctions)
Sets user defined function resources that can be used by this query.
|
abstract ConnectionSettings.Builder |
setUseReadAPI(Boolean useReadAPI)
Sets useReadAPI flag, enabled by default.
|
abstract ConnectionSettings.Builder |
setWriteDisposition(JobInfo.WriteDisposition writeDisposition)
Sets the action that should occur if the destination table already exists.
|
@Nullable public abstract ConnectionSettings.Builder setUseReadAPI(Boolean useReadAPI)
useReadAPI
- or true
for nonepublic abstract ConnectionSettings.Builder setRequestTimeout(Long timeoutMs)
timeoutMs
- or null
for nonepublic abstract ConnectionSettings.Builder setConnectionProperties(List<ConnectionProperty> connectionProperties)
connectionProperties
- connectionProperties or null
for nonepublic abstract ConnectionSettings.Builder setDefaultDataset(DatasetId datasetId)
public abstract ConnectionSettings.Builder setMaximumBytesBilled(Long maximumBytesBilled)
maximumBytesBilled
- maximum bytes billed for this jobpublic abstract ConnectionSettings.Builder setMaxResults(Long maxResults)
maxResults
- maxResults or null
for nonepublic abstract ConnectionSettings.Builder setNumBufferedRows(Integer numBufferedRows)
numBufferedRows
- numBufferedRows or null
for nonepublic abstract ConnectionSettings.Builder setTotalToPageRowCountRatio(Integer totalToPageRowCountRatio)
totalToPageRowCountRatio
- totalToPageRowCountRatiopublic abstract ConnectionSettings.Builder setMinResultSize(Integer minResultSize)
minResultSize
- minResultSizepublic abstract ConnectionSettings.Builder setMaxResultPerPage(Integer maxResultPerPage)
maxResultPerPage
- public abstract ConnectionSettings.Builder setUseQueryCache(Boolean useQueryCache)
setDestinationTable(TableId)
is not set.public abstract ConnectionSettings.Builder setFlattenResults(Boolean flattenResults)
false
setAllowLargeResults(Boolean)
must be true
. By default
results are flattened.public abstract ConnectionSettings.Builder setClustering(Clustering clustering)
public abstract ConnectionSettings.Builder setCreateDisposition(JobInfo.CreateDisposition createDisposition)
public abstract ConnectionSettings.Builder setDestinationEncryptionConfiguration(EncryptionConfiguration destinationEncryptionConfiguration)
destinationEncryptionConfiguration
- destinationEncryptionConfiguration or null
for nonepublic abstract ConnectionSettings.Builder setDestinationTable(TableId destinationTable)
setAllowLargeResults(Boolean)
is set to
true
.public abstract ConnectionSettings.Builder setJobTimeoutMs(Long jobTimeoutMs)
jobTimeoutMs
- jobTimeoutMs or null
for nonepublic abstract ConnectionSettings.Builder setMaximumBillingTier(Integer maximumBillingTier)
maximumBillingTier
- maximum billing tier for this jobpublic abstract ConnectionSettings.Builder setPriority(QueryJobConfiguration.Priority priority)
QueryJobConfiguration.Priority.INTERACTIVE
.public abstract ConnectionSettings.Builder setAllowLargeResults(Boolean allowLargeResults)
true
the
query is allowed to create large results at a slight cost in performance. If true
setDestinationTable(TableId)
must be provided.public abstract ConnectionSettings.Builder setCreateSession(Boolean createSession)
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."public abstract ConnectionSettings.Builder setRangePartitioning(RangePartitioning rangePartitioning)
rangePartitioning
- rangePartitioning or null
for nonepublic abstract ConnectionSettings.Builder setSchemaUpdateOptions(List<JobInfo.SchemaUpdateOption> schemaUpdateOptions)
public abstract ConnectionSettings.Builder setTableDefinitions(Map<String,ExternalTableDefinition> tableDefinitions)
public abstract ConnectionSettings.Builder setTimePartitioning(TimePartitioning timePartitioning)
public abstract ConnectionSettings.Builder setUserDefinedFunctions(List<UserDefinedFunction> userDefinedFunctions)
UserDefinedFunction.inline(String)
) or loaded from a Google
Cloud Storage URI (UserDefinedFunction.fromUri(String)
.public abstract ConnectionSettings.Builder setWriteDisposition(JobInfo.WriteDisposition writeDisposition)
public abstract ConnectionSettings build()
ConnectionSettings
object.Copyright © 2023 Google LLC. All rights reserved.