Package com.google.cloud.bigquery
Class ConnectionSettings
- java.lang.Object
-
- com.google.cloud.bigquery.ConnectionSettings
-
public abstract class ConnectionSettings extends Object
ConnectionSettings for setting up a BigQuery query connection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConnectionSettings.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Boolean
getAllowLargeResults()
Returns whether the job is enabled to create arbitrarily large results.abstract Clustering
getClustering()
Returns the clustering specification for the destination table.abstract List<ConnectionProperty>
getConnectionProperties()
Returns the connection properties for connection string with this queryabstract JobInfo.CreateDisposition
getCreateDisposition()
Returns whether the job is allowed to create new tables.abstract Boolean
getCreateSession()
Returns whether to create a new session.abstract DatasetId
getDefaultDataset()
Returns the default datasetabstract EncryptionConfiguration
getDestinationEncryptionConfiguration()
Returns the custom encryption configuration (e.g., Cloud KMS keys)abstract TableId
getDestinationTable()
Returns the table where to put query results.abstract Boolean
getFlattenResults()
Returns whether nested and repeated fields should be flattened.abstract Long
getJobTimeoutMs()
Returns the timeout associated with this jobabstract Integer
getMaximumBillingTier()
Returns the optional billing tier limit for this job.abstract Long
getMaximumBytesBilled()
Returns the limits the bytes billed for this jobabstract Integer
getMaxResultPerPage()
abstract Long
getMaxResults()
Returns the maximum number of rows of dataabstract Integer
getMinResultSize()
abstract Integer
getNumBufferedRows()
Returns the number of rows of data to pre-fetchabstract QueryJobConfiguration.Priority
getPriority()
Returns the query priority.abstract RangePartitioning
getRangePartitioning()
Returns the range partitioning specification for the tableabstract Long
getRequestTimeout()
Returns the synchronous response timeoutMs associated with this queryabstract List<JobInfo.SchemaUpdateOption>
getSchemaUpdateOptions()
[Experimental] Returns options allowing the schema of the destination table to be updated as a side effect of the query job.abstract Map<String,ExternalTableDefinition>
getTableDefinitions()
Returns the external tables definitions.abstract TimePartitioning
getTimePartitioning()
Returns the time partitioning specification for the destination table.abstract Integer
getTotalToPageRowCountRatio()
abstract Boolean
getUseQueryCache()
Returns whether to look for the result in the query cacheabstract List<UserDefinedFunction>
getUserDefinedFunctions()
Returns user defined function resources that can be used by this query.abstract Boolean
getUseReadAPI()
Returns useReadAPI flag, enabled by default.abstract JobInfo.WriteDisposition
getWriteDisposition()
Returns the action that should occur if the destination table already exists.static ConnectionSettings.Builder
newBuilder()
Returns a builder for aConnectionSettings
object.abstract ConnectionSettings.Builder
toBuilder()
Returns a builder pre-populated using the current values of this field.
-
-
-
Method Detail
-
getUseReadAPI
@Nullable public abstract Boolean getUseReadAPI()
Returns useReadAPI flag, enabled by default. Read API will be used if the underlying conditions are satisfied and this flag is enabled
-
getRequestTimeout
@Nullable public abstract Long getRequestTimeout()
Returns the synchronous response timeoutMs associated with this query
-
getConnectionProperties
@Nullable public abstract List<ConnectionProperty> getConnectionProperties()
Returns the connection properties for connection string with this query
-
getDefaultDataset
@Nullable public abstract DatasetId getDefaultDataset()
Returns the default dataset
-
getMaximumBytesBilled
@Nullable public abstract Long getMaximumBytesBilled()
Returns the limits the bytes billed for this job
-
getMaxResults
@Nullable public abstract Long getMaxResults()
Returns the maximum number of rows of data
-
getNumBufferedRows
@Nullable public abstract Integer getNumBufferedRows()
Returns the number of rows of data to pre-fetch
-
getUseQueryCache
@Nullable public abstract Boolean getUseQueryCache()
Returns whether to look for the result in the query cache
-
getFlattenResults
@Nullable public abstract Boolean getFlattenResults()
Returns whether nested and repeated fields should be flattened. If set tofalse
ConnectionSettings.Builder.setAllowLargeResults(Boolean)
must betrue
.- See Also:
- Flatten
-
getClustering
@Nullable public abstract Clustering getClustering()
Returns the clustering specification for the destination table.
-
getCreateDisposition
@Nullable public abstract JobInfo.CreateDisposition getCreateDisposition()
Returns whether the job is allowed to create new tables.- See Also:
- Create Disposition
-
getDestinationEncryptionConfiguration
@Nullable public abstract EncryptionConfiguration getDestinationEncryptionConfiguration()
Returns the custom encryption configuration (e.g., Cloud KMS keys)
-
getDestinationTable
@Nullable public abstract TableId getDestinationTable()
Returns the table where to put query results. If not provided a new table is created. This value is required ifgetAllowLargeResults()
istrue
.
-
getJobTimeoutMs
@Nullable public abstract Long getJobTimeoutMs()
Returns the timeout associated with this job
-
getMaximumBillingTier
@Nullable public abstract Integer getMaximumBillingTier()
Returns the optional billing tier limit for this job.
-
getPriority
@Nullable public abstract QueryJobConfiguration.Priority getPriority()
Returns the query priority.
-
getAllowLargeResults
@Nullable public abstract Boolean getAllowLargeResults()
Returns whether the job is enabled to create arbitrarily large results. Iftrue
the query is allowed to create large results at a slight cost in performance. the query is allowed to create large results at a slight cost in performance.- See Also:
- Returning Large Query Results
-
getCreateSession
@Nullable public abstract Boolean getCreateSession()
Returns whether to create a new session.- See Also:
- Create Sessions
-
getRangePartitioning
@Nullable public abstract RangePartitioning getRangePartitioning()
Returns the range partitioning specification for the table
-
getSchemaUpdateOptions
@Nullable public abstract List<JobInfo.SchemaUpdateOption> getSchemaUpdateOptions()
[Experimental] Returns 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.
-
getTableDefinitions
@Nullable public abstract Map<String,ExternalTableDefinition> getTableDefinitions()
Returns 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.
-
getTimePartitioning
@Nullable public abstract TimePartitioning getTimePartitioning()
Returns the time partitioning specification for the destination table.
-
getUserDefinedFunctions
@Nullable public abstract List<UserDefinedFunction> getUserDefinedFunctions()
Returns user defined function resources that can be used by this query. Function resources can either be defined inline (UserDefinedFunction.Type.INLINE
) or loaded from a Google Cloud Storage URI (UserDefinedFunction.Type.FROM_URI
.
-
getWriteDisposition
@Nullable public abstract JobInfo.WriteDisposition getWriteDisposition()
Returns the action that should occur if the destination table already exists.- See Also:
- Write Disposition
-
toBuilder
public abstract ConnectionSettings.Builder toBuilder()
Returns a builder pre-populated using the current values of this field.
-
newBuilder
public static ConnectionSettings.Builder newBuilder()
Returns a builder for aConnectionSettings
object.
-
-