Package com.google.cloud.bigquery.spi.v2
Class HttpBigQueryRpc
java.lang.Object
com.google.cloud.bigquery.spi.v2.HttpBigQueryRpc
- All Implemented Interfaces:
BigQueryRpc,com.google.cloud.ServiceRpc
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.cloud.bigquery.spi.v2.BigQueryRpc
BigQueryRpc.Option -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanSends a job cancel request.com.google.api.services.bigquery.model.Datasetcreate(com.google.api.services.bigquery.model.Dataset dataset, Map<BigQueryRpc.Option, ?> options) Creates a new dataset.com.google.api.services.bigquery.model.Jobcreate(com.google.api.services.bigquery.model.Job job, Map<BigQueryRpc.Option, ?> options) Creates a new job.com.google.api.services.bigquery.model.Routinecreate(com.google.api.services.bigquery.model.Routine routine, Map<BigQueryRpc.Option, ?> options) Creates the requested routine.com.google.api.services.bigquery.model.Tablecreate(com.google.api.services.bigquery.model.Table table, Map<BigQueryRpc.Option, ?> options) Creates a new table.com.google.api.services.bigquery.model.JobcreateJobForQuery(com.google.api.services.bigquery.model.Job job) Creates a new query job.booleandeleteDataset(String projectId, String datasetId, Map<BigQueryRpc.Option, ?> options) Delete the requested dataset.booleanSends a job delete request.booleandeleteModel(String projectId, String datasetId, String modelId) Delete the requested model.booleandeleteRoutine(String projectId, String datasetId, String routineId) Deletes the requested routine.booleandeleteTable(String projectId, String datasetId, String tableId) Delete the requested table.com.google.api.services.bigquery.model.DatasetgetDataset(String projectId, String datasetId, Map<BigQueryRpc.Option, ?> options) Returns the requested dataset ornullif not found.com.google.api.services.bigquery.model.PolicygetIamPolicy(String resourceId, Map<BigQueryRpc.Option, ?> options) Returns the IAM Policy for the specified resource, using Policy V1.com.google.api.services.bigquery.model.JobReturns the requested job ornullif not found.com.google.api.services.bigquery.model.ModelReturns the requested model ornullif not found.com.google.api.services.bigquery.model.JobgetQueryJob(String projectId, String jobId, String location) Returns the requested query job ornullif not found.com.google.api.services.bigquery.model.GetQueryResultsResponsegetQueryResults(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.GetQueryResultsResponsegetQueryResultsWithRowLimit(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.RoutinegetRoutine(String projectId, String datasetId, String routineId, Map<BigQueryRpc.Option, ?> options) Returns the requested routine ornullif not found.com.google.api.services.bigquery.model.TableReturns the requested table ornullif not found.com.google.api.services.bigquery.model.TableDataInsertAllResponseinsertAll(String projectId, String datasetId, String tableId, com.google.api.services.bigquery.model.TableDataInsertAllRequest request) Sends an insert all request.listDatasets(String projectId, Map<BigQueryRpc.Option, ?> options) Lists the provided project's datasets, keyed by page token.listJobs(String projectId, Map<BigQueryRpc.Option, ?> options) Lists the project's jobs.listModels(String projectId, String datasetId, Map<BigQueryRpc.Option, ?> options) Lists the dataset's models, keyed by page token.listRoutines(String projectId, String datasetId, Map<BigQueryRpc.Option, ?> options) com.google.api.services.bigquery.model.TableDataListlistTableData(String projectId, String datasetId, String tableId, Map<BigQueryRpc.Option, ?> options) Lists the table's rows.com.google.api.services.bigquery.model.TableDataListlistTableDataWithRowLimit(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.listTables(String projectId, String datasetId, Map<BigQueryRpc.Option, ?> options) Lists the dataset's tables, keyed by page token.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.Datasetpatch(com.google.api.services.bigquery.model.Dataset dataset, Map<BigQueryRpc.Option, ?> options) Updates dataset information.com.google.api.services.bigquery.model.Modelpatch(com.google.api.services.bigquery.model.Model model, Map<BigQueryRpc.Option, ?> options) Updates model information.com.google.api.services.bigquery.model.Tablepatch(com.google.api.services.bigquery.model.Table table, Map<BigQueryRpc.Option, ?> options) Updates table information.com.google.api.services.bigquery.model.QueryResponseRuns a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.com.google.api.services.bigquery.model.PolicysetIamPolicy(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.TestIamPermissionsResponsetestIamPermissions(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.Routineupdate(com.google.api.services.bigquery.model.Routine routine, Map<BigQueryRpc.Option, ?> options) Updates the requested routine.com.google.api.services.bigquery.model.Jobwrite(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.
-
Field Details
-
DEFAULT_PROJECTION
- See Also:
-
-
Constructor Details
-
HttpBigQueryRpc
-
-
Method Details
-
getDataset
public com.google.api.services.bigquery.model.Dataset getDataset(String projectId, String datasetId, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcReturns the requested dataset ornullif not found.- Specified by:
getDatasetin interfaceBigQueryRpc
-
listDatasets
public com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Dataset>> listDatasets(String projectId, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcLists the provided project's datasets, keyed by page token. Partial information is returned on a dataset (datasetReference, friendlyName and id). To get full information useBigQueryRpc.getDataset(String, String, Map).- Specified by:
listDatasetsin interfaceBigQueryRpc
-
create
public com.google.api.services.bigquery.model.Dataset create(com.google.api.services.bigquery.model.Dataset dataset, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcCreates a new dataset.- Specified by:
createin interfaceBigQueryRpc
-
create
public com.google.api.services.bigquery.model.Table create(com.google.api.services.bigquery.model.Table table, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcCreates a new table.- Specified by:
createin interfaceBigQueryRpc
-
create
public com.google.api.services.bigquery.model.Routine create(com.google.api.services.bigquery.model.Routine routine, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcCreates the requested routine.- Specified by:
createin interfaceBigQueryRpc
-
create
public com.google.api.services.bigquery.model.Job create(com.google.api.services.bigquery.model.Job job, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcCreates a new job.- Specified by:
createin interfaceBigQueryRpc
-
createJobForQuery
public com.google.api.services.bigquery.model.Job createJobForQuery(com.google.api.services.bigquery.model.Job job) Description copied from interface:BigQueryRpcCreates a new query job.- Specified by:
createJobForQueryin interfaceBigQueryRpc
-
deleteDataset
Description copied from interface:BigQueryRpcDelete the requested dataset.- Specified by:
deleteDatasetin interfaceBigQueryRpc- Returns:
trueif dataset was deleted,falseif it was not found
-
patch
public com.google.api.services.bigquery.model.Dataset patch(com.google.api.services.bigquery.model.Dataset dataset, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcUpdates dataset information.- Specified by:
patchin interfaceBigQueryRpc
-
patch
public com.google.api.services.bigquery.model.Table patch(com.google.api.services.bigquery.model.Table table, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcUpdates table information.- Specified by:
patchin interfaceBigQueryRpc
-
getTable
public com.google.api.services.bigquery.model.Table getTable(String projectId, String datasetId, String tableId, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcReturns the requested table ornullif not found.- Specified by:
getTablein interfaceBigQueryRpc
-
listTables
public com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Table>> listTables(String projectId, String datasetId, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcLists the dataset's tables, keyed by page token. Partial information is returned on a table (tableReference, friendlyName, id and type). To get full information useBigQueryRpc.getTable(String, String, String, Map).- Specified by:
listTablesin interfaceBigQueryRpc
-
deleteTable
Description copied from interface:BigQueryRpcDelete the requested table.- Specified by:
deleteTablein interfaceBigQueryRpc- Returns:
trueif table was deleted,falseif it was not found
-
patch
public com.google.api.services.bigquery.model.Model patch(com.google.api.services.bigquery.model.Model model, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcUpdates model information.- Specified by:
patchin interfaceBigQueryRpc
-
getModel
public com.google.api.services.bigquery.model.Model getModel(String projectId, String datasetId, String modelId, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcReturns the requested model ornullif not found.- Specified by:
getModelin interfaceBigQueryRpc
-
listModels
public com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Model>> listModels(String projectId, String datasetId, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcLists the dataset's models, keyed by page token.- Specified by:
listModelsin interfaceBigQueryRpc
-
deleteModel
Description copied from interface:BigQueryRpcDelete the requested model.- Specified by:
deleteModelin interfaceBigQueryRpc- Returns:
trueif model was deleted,falseif it was not found
-
update
public com.google.api.services.bigquery.model.Routine update(com.google.api.services.bigquery.model.Routine routine, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcUpdates the requested routine.- Specified by:
updatein interfaceBigQueryRpc
-
getRoutine
public com.google.api.services.bigquery.model.Routine getRoutine(String projectId, String datasetId, String routineId, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcReturns the requested routine ornullif not found.- Specified by:
getRoutinein interfaceBigQueryRpc
-
listRoutines
public com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Routine>> listRoutines(String projectId, String datasetId, Map<BigQueryRpc.Option, ?> options) - Specified by:
listRoutinesin interfaceBigQueryRpc
-
deleteRoutine
Description copied from interface:BigQueryRpcDeletes the requested routine.- Specified by:
deleteRoutinein interfaceBigQueryRpc- Returns:
trueif routine was deleted,falseif it was not found
-
insertAll
public com.google.api.services.bigquery.model.TableDataInsertAllResponse insertAll(String projectId, String datasetId, String tableId, com.google.api.services.bigquery.model.TableDataInsertAllRequest request) Description copied from interface:BigQueryRpcSends an insert all request.- Specified by:
insertAllin interfaceBigQueryRpc
-
listTableData
public com.google.api.services.bigquery.model.TableDataList listTableData(String projectId, String datasetId, String tableId, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcLists the table's rows.- Specified by:
listTableDatain interfaceBigQueryRpc
-
listTableDataWithRowLimit
public com.google.api.services.bigquery.model.TableDataList listTableDataWithRowLimit(String projectId, String datasetId, String tableId, Integer maxResultPerPage, String pageToken) Description copied from interface:BigQueryRpcLists the table's rows with a limit on how many rows of data to pre-fetch.- Specified by:
listTableDataWithRowLimitin interfaceBigQueryRpc
-
getJob
public com.google.api.services.bigquery.model.Job getJob(String projectId, String jobId, String location, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcReturns the requested job ornullif not found.- Specified by:
getJobin interfaceBigQueryRpc
-
getQueryJob
public com.google.api.services.bigquery.model.Job getQueryJob(String projectId, String jobId, String location) Description copied from interface:BigQueryRpcReturns the requested query job ornullif not found.- Specified by:
getQueryJobin interfaceBigQueryRpc
-
listJobs
public com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Job>> listJobs(String projectId, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcLists the project's jobs.- Specified by:
listJobsin interfaceBigQueryRpc
-
cancel
Description copied from interface:BigQueryRpcSends a job cancel request. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully.- Specified by:
cancelin interfaceBigQueryRpc- Returns:
trueif cancel was requested successfully,falseif the job was not found
-
deleteJob
Description copied from interface:BigQueryRpcSends a job delete request.- Specified by:
deleteJobin interfaceBigQueryRpc- Returns:
trueif delete was successful,falseif the job was not found
-
getQueryResults
public com.google.api.services.bigquery.model.GetQueryResultsResponse getQueryResults(String projectId, String jobId, String location, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcReturns results of the query associated with the provided job.- Specified by:
getQueryResultsin interfaceBigQueryRpc
-
getQueryResultsWithRowLimit
public com.google.api.services.bigquery.model.GetQueryResultsResponse getQueryResultsWithRowLimit(String projectId, String jobId, String location, Integer maxResultPerPage, Long timeoutMs) Description copied from interface:BigQueryRpcReturns results of the query with a limit on how many rows of data to pre-fetch associated with the provided job.- Specified by:
getQueryResultsWithRowLimitin interfaceBigQueryRpc
-
queryRpc
public com.google.api.services.bigquery.model.QueryResponse queryRpc(String projectId, com.google.api.services.bigquery.model.QueryRequest content) Description copied from interface:BigQueryRpcRuns a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.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.- Specified by:
queryRpcin interfaceBigQueryRpc- Parameters:
projectId- Project ID of the project billed for the querycontent- theQueryRequest- Returns:
- the request
-
open
Description copied from interface:BigQueryRpcOpens a resumable upload session to load data into a BigQuery table and returns an upload URI.- Specified by:
openin interfaceBigQueryRpc- Parameters:
loadJob- load job
-
write
public com.google.api.services.bigquery.model.Job write(String uploadId, byte[] toWrite, int toWriteOffset, long destOffset, int length, boolean last) Description copied from interface:BigQueryRpcUploads the provided data to the resumable upload session at the specified position. This method returns the job created to insert the rows, only whenlastistrue.- Specified by:
writein interfaceBigQueryRpc- Parameters:
uploadId- the resumable upload session URItoWrite- a byte array of data to uploadtoWriteOffset- offset in thetoWriteparam to start writing fromdestOffset- offset in the destination where to upload data tolength- the number of bytes to uploadlast-trueindicates that the last chunk is being uploaded- Returns:
- returns the job created to insert the rows, only when
lastistrue. Returnsnullotherwise
-
getIamPolicy
public com.google.api.services.bigquery.model.Policy getIamPolicy(String resourceId, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcReturns the IAM Policy for the specified resource, using Policy V1.- Specified by:
getIamPolicyin interfaceBigQueryRpc
-
setIamPolicy
public com.google.api.services.bigquery.model.Policy setIamPolicy(String resourceId, com.google.api.services.bigquery.model.Policy policy, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcUpdates the IAM policy for the specified resource.- Specified by:
setIamPolicyin interfaceBigQueryRpc
-
testIamPermissions
public com.google.api.services.bigquery.model.TestIamPermissionsResponse testIamPermissions(String resourceId, List<String> permissions, Map<BigQueryRpc.Option, ?> options) Description copied from interface:BigQueryRpcTests whether the caller holds the provided permissions for the specified resource. Returns the subset of permissions the caller actually holds.- Specified by:
testIamPermissionsin interfaceBigQueryRpc
-