Package com.google.cloud.bigquery.spi.v2
Interface BigQueryRpc
- All Superinterfaces:
com.google.cloud.ServiceRpc
- All Known Implementing Classes:
HttpBigQueryRpc
@InternalExtensionOnly
public interface BigQueryRpc
extends com.google.cloud.ServiceRpc
-
Nested Class Summary
Nested Classes -
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 preFetchedRowLimit, 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 dataset, 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 rowLimit, String pageToken) Lists the table's rows with a limit on how many rows of data to pre-fetch.listTables(String projectId, String dataset, Map<BigQueryRpc.Option, ?> options) Lists the dataset's tables, keyed by page token.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.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.
-
Method Details
-
getDataset
com.google.api.services.bigquery.model.Dataset getDataset(String projectId, String datasetId, Map<BigQueryRpc.Option, ?> options) Returns the requested dataset ornullif not found.- Throws:
BigQueryException- upon failure
-
listDatasets
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. Partial information is returned on a dataset (datasetReference, friendlyName and id). To get full information usegetDataset(String, String, Map).- Throws:
BigQueryException- upon failure
-
create
com.google.api.services.bigquery.model.Dataset create(com.google.api.services.bigquery.model.Dataset dataset, Map<BigQueryRpc.Option, ?> options) Creates a new dataset.- Throws:
BigQueryException- upon failure
-
create
com.google.api.services.bigquery.model.Table create(com.google.api.services.bigquery.model.Table table, Map<BigQueryRpc.Option, ?> options) Creates a new table.- Throws:
BigQueryException- upon failure
-
create
com.google.api.services.bigquery.model.Job create(com.google.api.services.bigquery.model.Job job, Map<BigQueryRpc.Option, ?> options) Creates a new job.- Throws:
BigQueryException- upon failure
-
createJobForQuery
com.google.api.services.bigquery.model.Job createJobForQuery(com.google.api.services.bigquery.model.Job job) Creates a new query job.- Throws:
BigQueryException- upon failure
-
deleteDataset
Delete the requested dataset.- Returns:
trueif dataset was deleted,falseif it was not found- Throws:
BigQueryException- upon failure
-
patch
com.google.api.services.bigquery.model.Dataset patch(com.google.api.services.bigquery.model.Dataset dataset, Map<BigQueryRpc.Option, ?> options) Updates dataset information.- Throws:
BigQueryException- upon failure
-
patch
com.google.api.services.bigquery.model.Table patch(com.google.api.services.bigquery.model.Table table, Map<BigQueryRpc.Option, ?> options) Updates table information.- Throws:
BigQueryException- upon failure
-
getTable
com.google.api.services.bigquery.model.Table getTable(String projectId, String datasetId, String tableId, Map<BigQueryRpc.Option, ?> options) Returns the requested table ornullif not found.- Throws:
BigQueryException- upon failure
-
listTables
com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Table>> listTables(String projectId, String dataset, Map<BigQueryRpc.Option, ?> options) Lists the dataset's tables, keyed by page token. Partial information is returned on a table (tableReference, friendlyName, id and type). To get full information usegetTable(String, String, String, Map).- Throws:
BigQueryException- upon failure
-
deleteTable
Delete the requested table.- Returns:
trueif table was deleted,falseif it was not found- Throws:
BigQueryException- upon failure
-
patch
com.google.api.services.bigquery.model.Model patch(com.google.api.services.bigquery.model.Model model, Map<BigQueryRpc.Option, ?> options) Updates model information.- Throws:
BigQueryException- upon failure
-
getModel
com.google.api.services.bigquery.model.Model getModel(String projectId, String datasetId, String modelId, Map<BigQueryRpc.Option, ?> options) Returns the requested model ornullif not found.- Throws:
BigQueryException- upon failure
-
listModels
com.google.cloud.Tuple<String,Iterable<com.google.api.services.bigquery.model.Model>> listModels(String projectId, String dataset, Map<BigQueryRpc.Option, ?> options) Lists the dataset's models, keyed by page token.- Throws:
BigQueryException- upon failure
-
deleteModel
Delete the requested model.- Returns:
trueif model was deleted,falseif it was not found- Throws:
BigQueryException- upon failure
-
create
com.google.api.services.bigquery.model.Routine create(com.google.api.services.bigquery.model.Routine routine, Map<BigQueryRpc.Option, ?> options) Creates the requested routine.- Throws:
BigQueryException- upon failure
-
update
com.google.api.services.bigquery.model.Routine update(com.google.api.services.bigquery.model.Routine routine, Map<BigQueryRpc.Option, ?> options) Updates the requested routine.- Throws:
BigQueryException- upon failure
-
getRoutine
com.google.api.services.bigquery.model.Routine getRoutine(String projectId, String datasetId, String routineId, Map<BigQueryRpc.Option, ?> options) Returns the requested routine ornullif not found.- Throws:
BigQueryException- upon failure
-
listRoutines
-
deleteRoutine
Deletes the requested routine.- Returns:
trueif routine was deleted,falseif it was not found- Throws:
BigQueryException- upon failure
-
insertAll
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.- Throws:
BigQueryException- upon failure
-
listTableData
com.google.api.services.bigquery.model.TableDataList listTableData(String projectId, String datasetId, String tableId, Map<BigQueryRpc.Option, ?> options) Lists the table's rows.- Throws:
BigQueryException- upon failure
-
listTableDataWithRowLimit
com.google.api.services.bigquery.model.TableDataList listTableDataWithRowLimit(String projectId, String datasetId, String tableId, Integer rowLimit, String pageToken) Lists the table's rows with a limit on how many rows of data to pre-fetch.- Throws:
BigQueryException- upon failure
-
getJob
com.google.api.services.bigquery.model.Job getJob(String projectId, String jobId, String location, Map<BigQueryRpc.Option, ?> options) Returns the requested job ornullif not found.- Throws:
BigQueryException- upon failure
-
getQueryJob
com.google.api.services.bigquery.model.Job getQueryJob(String projectId, String jobId, String location) Returns the requested query job ornullif not found.- Throws:
BigQueryException- upon failure
-
listJobs
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.- Throws:
BigQueryException- upon failure
-
cancel
Sends 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.- Returns:
trueif cancel was requested successfully,falseif the job was not found- Throws:
BigQueryException- upon failure
-
deleteJob
Sends a job delete request.- Returns:
trueif delete was successful,falseif the job was not found- Throws:
BigQueryException- upon failure
-
getQueryResults
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.- Throws:
BigQueryException- upon failure
-
getQueryResultsWithRowLimit
com.google.api.services.bigquery.model.GetQueryResultsResponse getQueryResultsWithRowLimit(String projectId, String jobId, String location, Integer preFetchedRowLimit, Long timeoutMs) Returns results of the query with a limit on how many rows of data to pre-fetch associated with the provided job.- Throws:
BigQueryException- upon failure
-
queryRpc
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.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.- Parameters:
projectId- Project ID of the project billed for the querycontent- theQueryRequest- Returns:
- the request
-
open
Opens a resumable upload session to load data into a BigQuery table and returns an upload URI.- Parameters:
job- load job- Throws:
BigQueryException- upon failure
-
write
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. This method returns the job created to insert the rows, only whenlastistrue.- 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 - Throws:
BigQueryException- upon failure
-
getIamPolicy
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.- Throws:
BigQueryException- upon failure
-
setIamPolicy
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.- Throws:
BigQueryException- upon failure
-
testIamPermissions
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. Returns the subset of permissions the caller actually holds.- Throws:
BigQueryException- upon failure
-