@InternalExtensionOnly public interface BigQueryRpc extends ServiceRpc
Modifier and Type | Interface and Description |
---|---|
static class |
BigQueryRpc.Option |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(String projectId,
String jobId,
String location)
Sends a job cancel request.
|
com.google.api.services.bigquery.model.Dataset |
create(com.google.api.services.bigquery.model.Dataset dataset,
Map<BigQueryRpc.Option,?> options)
Creates a new dataset.
|
com.google.api.services.bigquery.model.Job |
create(com.google.api.services.bigquery.model.Job job,
Map<BigQueryRpc.Option,?> options)
Creates a new job.
|
com.google.api.services.bigquery.model.Table |
create(com.google.api.services.bigquery.model.Table table,
Map<BigQueryRpc.Option,?> options)
Creates a new table.
|
boolean |
deleteDataset(String projectId,
String datasetId,
Map<BigQueryRpc.Option,?> options)
Delete the requested dataset.
|
boolean |
deleteTable(String projectId,
String datasetId,
String tableId)
Delete the requested table.
|
com.google.api.services.bigquery.model.Dataset |
getDataset(String projectId,
String datasetId,
Map<BigQueryRpc.Option,?> options)
Returns the requested dataset or
null if not found. |
com.google.api.services.bigquery.model.Job |
getJob(String projectId,
String jobId,
String location,
Map<BigQueryRpc.Option,?> options)
Returns the requested job or
null if not found. |
com.google.api.services.bigquery.model.GetQueryResultsResponse |
getQueryResults(String projectId,
String jobId,
String location,
Map<BigQueryRpc.Option,?> options)
Returns results of the query associated with the provided job.
|
com.google.api.services.bigquery.model.Table |
getTable(String projectId,
String datasetId,
String tableId,
Map<BigQueryRpc.Option,?> options)
Returns the requested table or
null if not found. |
com.google.api.services.bigquery.model.TableDataInsertAllResponse |
insertAll(String projectId,
String datasetId,
String tableId,
com.google.api.services.bigquery.model.TableDataInsertAllRequest request)
Sends an insert all request.
|
Tuple<String,Iterable<com.google.api.services.bigquery.model.Dataset>> |
listDatasets(String projectId,
Map<BigQueryRpc.Option,?> options)
Lists the provided project's datasets.
|
Tuple<String,Iterable<com.google.api.services.bigquery.model.Job>> |
listJobs(String projectId,
Map<BigQueryRpc.Option,?> options)
Lists the project's jobs.
|
com.google.api.services.bigquery.model.TableDataList |
listTableData(String projectId,
String datasetId,
String tableId,
Map<BigQueryRpc.Option,?> options)
Lists the table's rows.
|
Tuple<String,Iterable<com.google.api.services.bigquery.model.Table>> |
listTables(String projectId,
String dataset,
Map<BigQueryRpc.Option,?> options)
Lists the dataset's tables.
|
String |
open(com.google.api.services.bigquery.model.Job job)
Opens a resumable upload session to load data into a BigQuery table and returns an upload URI.
|
com.google.api.services.bigquery.model.Dataset |
patch(com.google.api.services.bigquery.model.Dataset dataset,
Map<BigQueryRpc.Option,?> options)
Updates dataset information.
|
com.google.api.services.bigquery.model.Table |
patch(com.google.api.services.bigquery.model.Table table,
Map<BigQueryRpc.Option,?> options)
Updates table information.
|
com.google.api.services.bigquery.model.Job |
write(String uploadId,
byte[] toWrite,
int toWriteOffset,
long destOffset,
int length,
boolean last)
Uploads the provided data to the resumable upload session at the specified position.
|
com.google.api.services.bigquery.model.Dataset getDataset(String projectId, String datasetId, Map<BigQueryRpc.Option,?> options)
null
if not found.BigQueryException
- upon failureTuple<String,Iterable<com.google.api.services.bigquery.model.Dataset>> listDatasets(String projectId, Map<BigQueryRpc.Option,?> options)
getDataset(String,
String, Map)
.BigQueryException
- upon failurecom.google.api.services.bigquery.model.Dataset create(com.google.api.services.bigquery.model.Dataset dataset, Map<BigQueryRpc.Option,?> options)
BigQueryException
- upon failurecom.google.api.services.bigquery.model.Table create(com.google.api.services.bigquery.model.Table table, Map<BigQueryRpc.Option,?> options)
BigQueryException
- upon failurecom.google.api.services.bigquery.model.Job create(com.google.api.services.bigquery.model.Job job, Map<BigQueryRpc.Option,?> options)
BigQueryException
- upon failureboolean deleteDataset(String projectId, String datasetId, Map<BigQueryRpc.Option,?> options)
true
if dataset was deleted, false
if it was not foundBigQueryException
- upon failurecom.google.api.services.bigquery.model.Dataset patch(com.google.api.services.bigquery.model.Dataset dataset, Map<BigQueryRpc.Option,?> options)
BigQueryException
- upon failurecom.google.api.services.bigquery.model.Table patch(com.google.api.services.bigquery.model.Table table, Map<BigQueryRpc.Option,?> options)
BigQueryException
- upon failurecom.google.api.services.bigquery.model.Table getTable(String projectId, String datasetId, String tableId, Map<BigQueryRpc.Option,?> options)
null
if not found.BigQueryException
- upon failureTuple<String,Iterable<com.google.api.services.bigquery.model.Table>> listTables(String projectId, String dataset, Map<BigQueryRpc.Option,?> options)
getTable(String, String,
String, Map)
.BigQueryException
- upon failureboolean deleteTable(String projectId, String datasetId, String tableId)
true
if table was deleted, false
if it was not foundBigQueryException
- upon failurecom.google.api.services.bigquery.model.TableDataInsertAllResponse insertAll(String projectId, String datasetId, String tableId, com.google.api.services.bigquery.model.TableDataInsertAllRequest request)
BigQueryException
- upon failurecom.google.api.services.bigquery.model.TableDataList listTableData(String projectId, String datasetId, String tableId, Map<BigQueryRpc.Option,?> options)
BigQueryException
- upon failurecom.google.api.services.bigquery.model.Job getJob(String projectId, String jobId, String location, Map<BigQueryRpc.Option,?> options)
null
if not found.BigQueryException
- upon failureTuple<String,Iterable<com.google.api.services.bigquery.model.Job>> listJobs(String projectId, Map<BigQueryRpc.Option,?> options)
BigQueryException
- upon failureboolean cancel(String projectId, String jobId, String location)
true
if cancel was requested successfully, false
if the job was not
foundBigQueryException
- upon failurecom.google.api.services.bigquery.model.GetQueryResultsResponse getQueryResults(String projectId, String jobId, String location, Map<BigQueryRpc.Option,?> options)
BigQueryException
- upon failureString open(com.google.api.services.bigquery.model.Job job)
job
- load jobBigQueryException
- upon failurecom.google.api.services.bigquery.model.Job write(String uploadId, byte[] toWrite, int toWriteOffset, long destOffset, int length, boolean last)
last
is true
.uploadId
- the resumable upload session URItoWrite
- a byte array of data to uploadtoWriteOffset
- offset in the toWrite
param to start writing fromdestOffset
- offset in the destination where to upload data tolength
- the number of bytes to uploadlast
- true
indicates that the last chunk is being uploadedlast
is true
.
Returns null
otherwiseBigQueryException
- upon failureCopyright © 2019 Google LLC. All rights reserved.