Class DataSource (2.58.0)
Version latestkeyboard_arrow_down
public class DataSource implements DataSource
BigQuery JDBC implementation of javax.sql.DataSource
A factory for connections to the physical data source that this DataSource object represents.
An alternative to the DriverManager facility, a DataSource object is the preferred means of
getting a connection. An object that implements the DataSource interface will typically be
registered with a naming service based on the Javaâ„¢ Naming and Directory (JNDI) API.
Constructors
DataSource()
An implementation of DataSource must include a public no-arg constructor.
Methods
<T>unwrap(Class<T> iface)
public T <T>unwrap ( Class<T> iface )
Parameter
Name
Description
iface
Class <T >
Returns
Type
Description
T
getAdditionalProjects()
public String getAdditionalProjects ()
Returns
Type
Description
String
getAllowLargeResults()
public Boolean getAllowLargeResults ()
getConnection()
public Connection getConnection ()
getConnection(String username, String password)
public Connection getConnection ( String username , String password )
getDefaultDataset()
public String getDefaultDataset ()
Returns
Type
Description
String
getDestinationDataset()
public String getDestinationDataset ()
Returns
Type
Description
String
getDestinationDatasetExpirationTime()
public Long getDestinationDatasetExpirationTime ()
Returns
Type
Description
Long
getDestinationTable()
public String getDestinationTable ()
Returns
Type
Description
String
getEnableHighThroughputAPI()
public boolean getEnableHighThroughputAPI ()
getEnableSession()
public boolean getEnableSession ()
getEnableWriteAPI()
public Boolean getEnableWriteAPI ()
getFilterTablesOnDefaultDataset()
public Boolean getFilterTablesOnDefaultDataset ()
getHighThroughputActivationRatio()
public int getHighThroughputActivationRatio ()
Returns
Type
Description
int
getHighThroughputMinTableSize()
public int getHighThroughputMinTableSize ()
Returns
Type
Description
int
getJobCreationMode()
public Integer getJobCreationMode ()
getKmsKeyName()
public String getKmsKeyName ()
Returns
Type
Description
String
getLocation()
public String getLocation ()
Returns
Type
Description
String
getLogLevel()
public String getLogLevel ()
Returns
Type
Description
String
getLogPath()
public String getLogPath ()
Returns
Type
Description
String
getLogWriter()
public PrintWriter getLogWriter ()
getLoginTimeout()
public int getLoginTimeout ()
Returns
Type
Description
int
public Integer getMetadataFetchThreadCount ()
getOAuthAccessToken()
public String getOAuthAccessToken ()
Returns
Type
Description
String
getOAuthClientId()
public String getOAuthClientId ()
Returns
Type
Description
String
getOAuthClientSecret()
public String getOAuthClientSecret ()
Returns
Type
Description
String
getOAuthPvtKey()
public String getOAuthPvtKey ()
Returns
Type
Description
String
getOAuthPvtKeyPath()
public String getOAuthPvtKeyPath ()
Returns
Type
Description
String
getOAuthRefreshToken()
public String getOAuthRefreshToken ()
Returns
Type
Description
String
getOAuthServiceAcctEmail()
public String getOAuthServiceAcctEmail ()
Returns
Type
Description
String
getOAuthType()
public int getOAuthType ()
Returns
Type
Description
int
getParentLogger()
public Logger getParentLogger ()
Returns
Type
Description
Logger
getPartnerToken()
public String getPartnerToken ()
Returns
Type
Description
String
getProjectId()
public String getProjectId ()
Returns
Type
Description
String
getProxyHost()
public String getProxyHost ()
Returns
Type
Description
String
getProxyPort()
public String getProxyPort ()
Returns
Type
Description
String
getProxyPwd()
public String getProxyPwd ()
Returns
Type
Description
String
getProxyUid()
public String getProxyUid ()
Returns
Type
Description
String
getQueryDialect()
public String getQueryDialect ()
Returns
Type
Description
String
getQueryProperties()
public Map<String , String > getQueryProperties ()
getRequestGoogleDriveScope()
public Integer getRequestGoogleDriveScope ()
getSSLTrustStorePassword()
public String getSSLTrustStorePassword ()
Returns
Type
Description
String
getSSLTrustStorePath()
public String getSSLTrustStorePath ()
Returns
Type
Description
String
getURL()
Returns
Type
Description
String
getUniverseDomain()
public String getUniverseDomain ()
Returns
Type
Description
String
getUnsupportedHTAPIFallback()
public boolean getUnsupportedHTAPIFallback ()
getUseQueryCache()
public Boolean getUseQueryCache ()
getUserAgent()
public String getUserAgent ()
Returns
Type
Description
String
isWrapperFor(Class<?> iface)
public boolean isWrapperFor ( Class <? > iface )
Parameter
Name
Description
iface
Class <? >
setAdditionalProjects(String additionalProjects)
public void setAdditionalProjects ( String additionalProjects )
Parameter
Name
Description
additionalProjects
String
setAllowLargeResults(Boolean allowLargeResults)
public void setAllowLargeResults ( Boolean allowLargeResults )
Parameter
Name
Description
allowLargeResults
Boolean
setDefaultDataset(String defaultDataset)
public void setDefaultDataset ( String defaultDataset )
Parameter
Name
Description
defaultDataset
String
setDestinationDataset(String destinationDataset)
public void setDestinationDataset ( String destinationDataset )
Parameter
Name
Description
destinationDataset
String
setDestinationDatasetExpirationTime(long destinationDatasetExpirationTime)
public void setDestinationDatasetExpirationTime ( long destinationDatasetExpirationTime )
Parameter
Name
Description
destinationDatasetExpirationTime
long
setDestinationTable(String destinationTable)
public void setDestinationTable ( String destinationTable )
Parameter
Name
Description
destinationTable
String
setEnableHighThroughputAPI(Boolean enableHighThroughputAPI)
public void setEnableHighThroughputAPI ( Boolean enableHighThroughputAPI )
Parameter
Name
Description
enableHighThroughputAPI
Boolean
setEnableSession(Boolean enableSession)
public void setEnableSession ( Boolean enableSession )
Parameter
Name
Description
enableSession
Boolean
setEnableWriteAPI(Boolean enableWriteAPI)
public void setEnableWriteAPI ( Boolean enableWriteAPI )
Parameter
Name
Description
enableWriteAPI
Boolean
setFilterTablesOnDefaultDataset(Boolean filterTablesOnDefaultDataset)
public void setFilterTablesOnDefaultDataset ( Boolean filterTablesOnDefaultDataset )
Parameter
Name
Description
filterTablesOnDefaultDataset
Boolean
setHighThroughputActivationRatio(Integer highThroughputActivationRatio)
public void setHighThroughputActivationRatio ( Integer highThroughputActivationRatio )
Parameter
Name
Description
highThroughputActivationRatio
Integer
setHighThroughputMinTableSize(Integer highThroughputMinTableSize)
public void setHighThroughputMinTableSize ( Integer highThroughputMinTableSize )
Parameter
Name
Description
highThroughputMinTableSize
Integer
setJobCreationMode(Integer jobCreationMode)
public void setJobCreationMode ( Integer jobCreationMode )
Parameter
Name
Description
jobCreationMode
Integer
setKmsKeyName(String kmsKeyName)
public void setKmsKeyName ( String kmsKeyName )
Parameter
Name
Description
kmsKeyName
String
setLocation(String location)
public void setLocation ( String location )
Parameter
Name
Description
location
String
setLogLevel(String logLevel)
public void setLogLevel ( String logLevel )
Parameter
Name
Description
logLevel
String
setLogPath(String logPath)
public void setLogPath ( String logPath )
Parameter
Name
Description
logPath
String
setLogWriter(PrintWriter out)
public void setLogWriter ( PrintWriter out )
setLoginTimeout(int seconds)
public void setLoginTimeout ( int seconds )
Parameter
Name
Description
seconds
int
public void setMetadataFetchThreadCount ( Integer metadataFetchThreadCount )
Parameter
Name
Description
metadataFetchThreadCount
Integer
setOAuthAccessToken(String oAuthAccessToken)
public void setOAuthAccessToken ( String oAuthAccessToken )
Parameter
Name
Description
oAuthAccessToken
String
setOAuthClientId(String oAuthClientId)
public void setOAuthClientId ( String oAuthClientId )
Parameter
Name
Description
oAuthClientId
String
setOAuthClientSecret(String oAuthClientSecret)
public void setOAuthClientSecret ( String oAuthClientSecret )
Parameter
Name
Description
oAuthClientSecret
String
setOAuthPvtKey(String oAuthPvtKey)
public void setOAuthPvtKey ( String oAuthPvtKey )
Parameter
Name
Description
oAuthPvtKey
String
setOAuthPvtKeyPath(String oAuthPvtKeyPath)
public void setOAuthPvtKeyPath ( String oAuthPvtKeyPath )
Parameter
Name
Description
oAuthPvtKeyPath
String
setOAuthRefreshToken(String oAuthRefreshToken)
public void setOAuthRefreshToken ( String oAuthRefreshToken )
Parameter
Name
Description
oAuthRefreshToken
String
setOAuthServiceAcctEmail(String oAuthServiceAcctEmail)
public void setOAuthServiceAcctEmail ( String oAuthServiceAcctEmail )
Parameter
Name
Description
oAuthServiceAcctEmail
String
setOAuthType(Integer oAuthType)
public void setOAuthType ( Integer oAuthType )
Parameter
Name
Description
oAuthType
Integer
setPartnerToken(String partnerToken)
public void setPartnerToken ( String partnerToken )
Parameter
Name
Description
partnerToken
String
setProjectId(String projectId)
public void setProjectId ( String projectId )
Parameter
Name
Description
projectId
String
setProxyHost(String proxyHost)
public void setProxyHost ( String proxyHost )
Parameter
Name
Description
proxyHost
String
setProxyPort(String proxyPort)
public void setProxyPort ( String proxyPort )
Parameter
Name
Description
proxyPort
String
setProxyPwd(String proxyPwd)
public void setProxyPwd ( String proxyPwd )
Parameter
Name
Description
proxyPwd
String
setProxyUid(String proxyUid)
public void setProxyUid ( String proxyUid )
Parameter
Name
Description
proxyUid
String
setQueryDialect(String queryDialect)
public void setQueryDialect ( String queryDialect )
Parameter
Name
Description
queryDialect
String
setQueryProperties(Map<String,String> queryProperties)
public void setQueryProperties ( Map<String , String > queryProperties )
setRequestGoogleDriveScope(Integer requestGoogleDriveScope)
public void setRequestGoogleDriveScope ( Integer requestGoogleDriveScope )
Parameter
Name
Description
requestGoogleDriveScope
Integer
setSSLTrustStorePassword(String sslTrustStorePassword)
public void setSSLTrustStorePassword ( String sslTrustStorePassword )
Parameter
Name
Description
sslTrustStorePassword
String
setSSLTrustStorePath(String sslTrustStorePath)
public void setSSLTrustStorePath ( String sslTrustStorePath )
Parameter
Name
Description
sslTrustStorePath
String
setURL(String URL)
public void setURL ( String URL )
Parameter
Name
Description
URL
String
setUniverseDomain(String universeDomain)
public void setUniverseDomain ( String universeDomain )
Parameter
Name
Description
universeDomain
String
setUnsupportedHTAPIFallback(Boolean unsupportedHTAPIFallback)
public void setUnsupportedHTAPIFallback ( Boolean unsupportedHTAPIFallback )
Parameter
Name
Description
unsupportedHTAPIFallback
Boolean
setUseQueryCache(Boolean useQueryCache)
public void setUseQueryCache ( Boolean useQueryCache )
Parameter
Name
Description
useQueryCache
Boolean
setUserAgent(String userAgent)
public void setUserAgent ( String userAgent )
Parameter
Name
Description
userAgent
String
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-02-02 UTC."],[],[]]