public class BigQueryDriver implements DriverJDBC Driver implementation for BigQuery.
Usage:
String CONNECTION_URL = "jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443"
- "ProjectId=test;OAuthType=3"" Connection connection = DriverManager.getConnection(CONNECTION_URL);
Valid URLs take the form:
jdbc:bigquery://{host}:{port};ProjectId={projectId};OAuthType={oAuthType}; {property1}={value1};{property2}={value2};...
Implements
DriverStatic Methods
getRegisteredDriver()
public static BigQueryDriver getRegisteredDriver()| Returns | |
|---|---|
| Type | Description |
BigQueryDriver |
the registered JDBC driver for BigQuery. |
| Exceptions | |
|---|---|
| Type | Description |
IllegalStateException |
if the driver has not been registered. |
Constructors
BigQueryDriver()
public BigQueryDriver()Methods
acceptsURL(String url)
public boolean acceptsURL(String url)See Also: Driver#acceptsURL(String)
| Parameter | |
|---|---|
| Name | Description |
url |
Stringa JDBC connection URL |
| Returns | |
|---|---|
| Type | Description |
boolean |
True if the URL is non-empty and starts with "jdbc:bigquery" |
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
connect(String url, Properties info)
public Connection connect(String url, Properties info)Attempts to establish a BigQuery connection to the given URL, using the provided connection Properties.
Valid URLs take the form:
jdbc:bigquery://{host}:{port};ProjectId={projectId};OAuthType={oAuthType}; {property1}={value1};{property2}={value2};...
See Also: Driver#connect(String, Properties)
| Parameters | |
|---|---|
| Name | Description |
url |
Stringthe BigQuery URL to connect to |
info |
Propertiesa list of arbitrary string tag/value pairs as connection arguments. |
| Returns | |
|---|---|
| Type | Description |
Connection |
A connection to the URL if it was established successfully, otherwise |
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
if driver fails to connect to clients. |
getMajorVersion()
public int getMajorVersion()| Returns | |
|---|---|
| Type | Description |
int |
|
getMinorVersion()
public int getMinorVersion()| Returns | |
|---|---|
| Type | Description |
int |
|
getParentLogger()
public Logger getParentLogger()| Returns | |
|---|---|
| Type | Description |
Logger |
|
getPropertyInfo(String url, Properties info)
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)Gets information about the possible BigQuery JDBC Connection Properties. See Also: Driver#getPropertyInfo(String, Properties)
| Parameters | |
|---|---|
| Name | Description |
url |
Stringthe BigQuery connection URL |
info |
Propertiesa proposed list BigQuery connection properties |
| Returns | |
|---|---|
| Type | Description |
java.sql.DriverPropertyInfo[] |
an array of |
jdbcCompliant()
public boolean jdbcCompliant()| Returns | |
|---|---|
| Type | Description |
boolean |
|