@InternalExtensionOnly public class HttpBigQueryRpc extends Object implements BigQueryRpc
BigQueryRpc.Option
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PROJECTION |
Constructor and Description |
---|
HttpBigQueryRpc(BigQueryOptions options) |
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.Routine |
create(com.google.api.services.bigquery.model.Routine routine,
Map<BigQueryRpc.Option,?> options)
Creates the requested routine.
|
com.google.api.services.bigquery.model.Table |
create(com.google.api.services.bigquery.model.Table table,
Map<BigQueryRpc.Option,?> options)
Creates a new table.
|
com.google.api.services.bigquery.model.Job |
createJobForQuery(com.google.api.services.bigquery.model.Job job)
Creates a new query job.
|
boolean |
deleteDataset(String projectId,
String datasetId,
Map<BigQueryRpc.Option,?> options)
Delete the requested dataset.
|
boolean |
deleteJob(String projectId,
String jobName,
String location)
Sends a job delete request.
|
boolean |
deleteModel(String projectId,
String datasetId,
String modelId)
Delete the requested model.
|
boolean |
deleteRoutine(String projectId,
String datasetId,
String routineId)
Deletes the requested routine.
|
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.Policy |
getIamPolicy(String resourceId,
Map<BigQueryRpc.Option,?> options)
Returns the IAM Policy for the specified resource, using Policy V1.
|
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.Model |
getModel(String projectId,
String datasetId,
String modelId,
Map<BigQueryRpc.Option,?> options)
Returns the requested model or
null if not found. |
com.google.api.services.bigquery.model.Job |
getQueryJob(String projectId,
String jobId,
String location)
Returns the requested query 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.GetQueryResultsResponse |
getQueryResultsWithRowLimit(String projectId,
String jobId,
String location,
Integer maxResultPerPage,
Long timeoutMs)
Returns results of the query with a limit on how many rows of data to pre-fetch associated with
the provided job.
|
com.google.api.services.bigquery.model.Routine |
getRoutine(String projectId,
String datasetId,
String routineId,
Map<BigQueryRpc.Option,?> options)
Returns the requested routine or
null if not found. |
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.
|
com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Dataset>> |
listDatasets(String projectId,
Map<BigQueryRpc.Option,?> options)
Lists the provided project's datasets, keyed by page token.
|
com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Job>> |
listJobs(String projectId,
Map<BigQueryRpc.Option,?> options)
Lists the project's jobs.
|
com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Model>> |
listModels(String projectId,
String datasetId,
Map<BigQueryRpc.Option,?> options)
Lists the dataset's models, keyed by page token.
|
com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Routine>> |
listRoutines(String projectId,
String datasetId,
Map<BigQueryRpc.Option,?> options) |
com.google.api.services.bigquery.model.TableDataList |
listTableData(String projectId,
String datasetId,
String tableId,
Map<BigQueryRpc.Option,?> options)
Lists the table's rows.
|
com.google.api.services.bigquery.model.TableDataList |
listTableDataWithRowLimit(String projectId,
String datasetId,
String tableId,
Integer maxResultPerPage,
String pageToken)
Lists the table's rows with a limit on how many rows of data to pre-fetch.
|
com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Table>> |
listTables(String projectId,
String datasetId,
Map<BigQueryRpc.Option,?> options)
Lists the dataset's tables, keyed by page token.
|
String |
open(com.google.api.services.bigquery.model.Job loadJob)
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.Model |
patch(com.google.api.services.bigquery.model.Model model,
Map<BigQueryRpc.Option,?> options)
Updates model 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.QueryResponse |
queryRpc(String projectId,
com.google.api.services.bigquery.model.QueryRequest content)
Runs a BigQuery SQL query synchronously and returns query results if the query completes within
a specified timeout.
|
com.google.api.services.bigquery.model.Policy |
setIamPolicy(String resourceId,
com.google.api.services.bigquery.model.Policy policy,
Map<BigQueryRpc.Option,?> options)
Updates the IAM policy for the specified resource.
|
com.google.api.services.bigquery.model.TestIamPermissionsResponse |
testIamPermissions(String resourceId,
List<String> permissions,
Map<BigQueryRpc.Option,?> options)
Tests whether the caller holds the provided permissions for the specified resource.
|
com.google.api.services.bigquery.model.Routine |
update(com.google.api.services.bigquery.model.Routine routine,
Map<BigQueryRpc.Option,?> options)
Updates the requested routine.
|
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.
|
public static final String DEFAULT_PROJECTION
public HttpBigQueryRpc(BigQueryOptions options)
public com.google.api.services.bigquery.model.Dataset getDataset(String projectId, String datasetId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
null
if not found.getDataset
in interface BigQueryRpc
public com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Dataset>> listDatasets(String projectId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
BigQueryRpc.getDataset(String, String, Map)
.listDatasets
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Dataset create(com.google.api.services.bigquery.model.Dataset dataset, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
create
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Table create(com.google.api.services.bigquery.model.Table table, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
create
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Routine create(com.google.api.services.bigquery.model.Routine routine, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
create
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Job create(com.google.api.services.bigquery.model.Job job, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
create
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Job createJobForQuery(com.google.api.services.bigquery.model.Job job)
BigQueryRpc
createJobForQuery
in interface BigQueryRpc
public boolean deleteDataset(String projectId, String datasetId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
deleteDataset
in interface BigQueryRpc
true
if dataset was deleted, false
if it was not foundpublic com.google.api.services.bigquery.model.Dataset patch(com.google.api.services.bigquery.model.Dataset dataset, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
patch
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Table patch(com.google.api.services.bigquery.model.Table table, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
patch
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Table getTable(String projectId, String datasetId, String tableId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
null
if not found.getTable
in interface BigQueryRpc
public com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Table>> listTables(String projectId, String datasetId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
BigQueryRpc.getTable(String, String, String, Map)
.listTables
in interface BigQueryRpc
public boolean deleteTable(String projectId, String datasetId, String tableId)
BigQueryRpc
deleteTable
in interface BigQueryRpc
true
if table was deleted, false
if it was not foundpublic com.google.api.services.bigquery.model.Model patch(com.google.api.services.bigquery.model.Model model, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
patch
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Model getModel(String projectId, String datasetId, String modelId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
null
if not found.getModel
in interface BigQueryRpc
public com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Model>> listModels(String projectId, String datasetId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
listModels
in interface BigQueryRpc
public boolean deleteModel(String projectId, String datasetId, String modelId)
BigQueryRpc
deleteModel
in interface BigQueryRpc
true
if model was deleted, false
if it was not foundpublic com.google.api.services.bigquery.model.Routine update(com.google.api.services.bigquery.model.Routine routine, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
update
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Routine getRoutine(String projectId, String datasetId, String routineId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
null
if not found.getRoutine
in interface BigQueryRpc
public com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Routine>> listRoutines(String projectId, String datasetId, Map<BigQueryRpc.Option,?> options)
listRoutines
in interface BigQueryRpc
public boolean deleteRoutine(String projectId, String datasetId, String routineId)
BigQueryRpc
deleteRoutine
in interface BigQueryRpc
true
if routine was deleted, false
if it was not foundpublic com.google.api.services.bigquery.model.TableDataInsertAllResponse insertAll(String projectId, String datasetId, String tableId, com.google.api.services.bigquery.model.TableDataInsertAllRequest request)
BigQueryRpc
insertAll
in interface BigQueryRpc
public com.google.api.services.bigquery.model.TableDataList listTableData(String projectId, String datasetId, String tableId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
listTableData
in interface BigQueryRpc
public com.google.api.services.bigquery.model.TableDataList listTableDataWithRowLimit(String projectId, String datasetId, String tableId, Integer maxResultPerPage, String pageToken)
BigQueryRpc
listTableDataWithRowLimit
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Job getJob(String projectId, String jobId, String location, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
null
if not found.getJob
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Job getQueryJob(String projectId, String jobId, String location)
BigQueryRpc
null
if not found.getQueryJob
in interface BigQueryRpc
public com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Job>> listJobs(String projectId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
listJobs
in interface BigQueryRpc
public boolean cancel(String projectId, String jobId, String location)
BigQueryRpc
cancel
in interface BigQueryRpc
true
if cancel was requested successfully, false
if the job was not
foundpublic boolean deleteJob(String projectId, String jobName, String location)
BigQueryRpc
deleteJob
in interface BigQueryRpc
true
if delete was successful, false
if the job was not foundpublic com.google.api.services.bigquery.model.GetQueryResultsResponse getQueryResults(String projectId, String jobId, String location, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
getQueryResults
in interface BigQueryRpc
public com.google.api.services.bigquery.model.GetQueryResultsResponse getQueryResultsWithRowLimit(String projectId, String jobId, String location, Integer maxResultPerPage, Long timeoutMs)
BigQueryRpc
getQueryResultsWithRowLimit
in interface BigQueryRpc
public com.google.api.services.bigquery.model.QueryResponse queryRpc(String projectId, com.google.api.services.bigquery.model.QueryRequest content)
BigQueryRpc
Create a request for the method "jobs.query".
This request holds the parameters needed by the bigquery server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
queryRpc
in interface BigQueryRpc
projectId
- Project ID of the project billed for the querycontent
- the QueryRequest
public String open(com.google.api.services.bigquery.model.Job loadJob)
BigQueryRpc
open
in interface BigQueryRpc
loadJob
- load jobpublic com.google.api.services.bigquery.model.Job write(String uploadId, byte[] toWrite, int toWriteOffset, long destOffset, int length, boolean last)
BigQueryRpc
last
is true
.write
in interface BigQueryRpc
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
otherwisepublic com.google.api.services.bigquery.model.Policy getIamPolicy(String resourceId, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
getIamPolicy
in interface BigQueryRpc
public com.google.api.services.bigquery.model.Policy setIamPolicy(String resourceId, com.google.api.services.bigquery.model.Policy policy, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
setIamPolicy
in interface BigQueryRpc
public com.google.api.services.bigquery.model.TestIamPermissionsResponse testIamPermissions(String resourceId, List<String> permissions, Map<BigQueryRpc.Option,?> options)
BigQueryRpc
testIamPermissions
in interface BigQueryRpc
Copyright © 2023 Google LLC. All rights reserved.