Class HttpBigQueryRpc

  • All Implemented Interfaces:
    BigQueryRpc, com.google.cloud.ServiceRpc

    @InternalExtensionOnly
    public class HttpBigQueryRpc
    extends Object
    implements BigQueryRpc
    • Constructor Detail

    • Method Detail

      • 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: BigQueryRpc
        Creates a new dataset.
        Specified by:
        create in interface BigQueryRpc
      • 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: BigQueryRpc
        Creates a new table.
        Specified by:
        create in interface BigQueryRpc
      • 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: BigQueryRpc
        Creates the requested routine.
        Specified by:
        create in interface BigQueryRpc
      • 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: BigQueryRpc
        Creates a new job.
        Specified by:
        create in interface BigQueryRpc
      • createJobForQuery

        public com.google.api.services.bigquery.model.Job createJobForQuery​(com.google.api.services.bigquery.model.Job job)
        Description copied from interface: BigQueryRpc
        Creates a new query job.
        Specified by:
        createJobForQuery in interface BigQueryRpc
      • 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: BigQueryRpc
        Updates dataset information.
        Specified by:
        patch in interface BigQueryRpc
      • 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: BigQueryRpc
        Updates table information.
        Specified by:
        patch in interface BigQueryRpc
      • deleteTable

        public boolean deleteTable​(String projectId,
                                   String datasetId,
                                   String tableId)
        Description copied from interface: BigQueryRpc
        Delete the requested table.
        Specified by:
        deleteTable in interface BigQueryRpc
        Returns:
        true if table was deleted, false if 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: BigQueryRpc
        Updates model information.
        Specified by:
        patch in interface BigQueryRpc
      • deleteModel

        public boolean deleteModel​(String projectId,
                                   String datasetId,
                                   String modelId)
        Description copied from interface: BigQueryRpc
        Delete the requested model.
        Specified by:
        deleteModel in interface BigQueryRpc
        Returns:
        true if model was deleted, false if 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: BigQueryRpc
        Updates the requested routine.
        Specified by:
        update in interface BigQueryRpc
      • deleteRoutine

        public boolean deleteRoutine​(String projectId,
                                     String datasetId,
                                     String routineId)
        Description copied from interface: BigQueryRpc
        Deletes the requested routine.
        Specified by:
        deleteRoutine in interface BigQueryRpc
        Returns:
        true if routine was deleted, false if 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: BigQueryRpc
        Sends an insert all request.
        Specified by:
        insertAll in interface BigQueryRpc
      • listTableDataWithRowLimit

        public com.google.api.services.bigquery.model.TableDataList listTableDataWithRowLimit​(String projectId,
                                                                                              String datasetId,
                                                                                              String tableId,
                                                                                              Integer maxResultPerPage,
                                                                                              String pageToken)
        Description copied from interface: BigQueryRpc
        Lists the table's rows with a limit on how many rows of data to pre-fetch.
        Specified by:
        listTableDataWithRowLimit in interface BigQueryRpc
      • getQueryJob

        public com.google.api.services.bigquery.model.Job getQueryJob​(String projectId,
                                                                      String jobId,
                                                                      String location)
        Description copied from interface: BigQueryRpc
        Returns the requested query job or null if not found.
        Specified by:
        getQueryJob in interface BigQueryRpc
      • cancel

        public boolean cancel​(String projectId,
                              String jobId,
                              String location)
        Description copied from interface: BigQueryRpc
        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.
        Specified by:
        cancel in interface BigQueryRpc
        Returns:
        true if cancel was requested successfully, false if the job was not found
      • deleteJob

        public boolean deleteJob​(String projectId,
                                 String jobName,
                                 String location)
        Description copied from interface: BigQueryRpc
        Sends a job delete request.
        Specified by:
        deleteJob in interface BigQueryRpc
        Returns:
        true if delete was successful, false if the job was not found
      • getQueryResultsWithRowLimit

        public com.google.api.services.bigquery.model.GetQueryResultsResponse getQueryResultsWithRowLimit​(String projectId,
                                                                                                          String jobId,
                                                                                                          String location,
                                                                                                          Integer maxResultPerPage,
                                                                                                          Long timeoutMs)
        Description copied from interface: BigQueryRpc
        Returns results of the query with a limit on how many rows of data to pre-fetch associated with the provided job.
        Specified by:
        getQueryResultsWithRowLimit in interface BigQueryRpc
      • queryRpc

        public com.google.api.services.bigquery.model.QueryResponse queryRpc​(String projectId,
                                                                             com.google.api.services.bigquery.model.QueryRequest content)
        Description copied from interface: BigQueryRpc
        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.

        Specified by:
        queryRpc in interface BigQueryRpc
        Parameters:
        projectId - Project ID of the project billed for the query
        content - the QueryRequest
        Returns:
        the request
      • open

        public String open​(com.google.api.services.bigquery.model.Job loadJob)
        Description copied from interface: BigQueryRpc
        Opens a resumable upload session to load data into a BigQuery table and returns an upload URI.
        Specified by:
        open in interface BigQueryRpc
        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: BigQueryRpc
        Uploads the provided data to the resumable upload session at the specified position. This method returns the job created to insert the rows, only when last is true.
        Specified by:
        write in interface BigQueryRpc
        Parameters:
        uploadId - the resumable upload session URI
        toWrite - a byte array of data to upload
        toWriteOffset - offset in the toWrite param to start writing from
        destOffset - offset in the destination where to upload data to
        length - the number of bytes to upload
        last - true indicates that the last chunk is being uploaded
        Returns:
        returns the job created to insert the rows, only when last is true. Returns null otherwise
      • getIamPolicy

        public com.google.api.services.bigquery.model.Policy getIamPolicy​(String resourceId,
                                                                          Map<BigQueryRpc.Option,​?> options)
        Description copied from interface: BigQueryRpc
        Returns the IAM Policy for the specified resource, using Policy V1.
        Specified by:
        getIamPolicy in interface BigQueryRpc
      • 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: BigQueryRpc
        Updates the IAM policy for the specified resource.
        Specified by:
        setIamPolicy in interface BigQueryRpc
      • testIamPermissions

        public com.google.api.services.bigquery.model.TestIamPermissionsResponse testIamPermissions​(String resourceId,
                                                                                                    List<String> permissions,
                                                                                                    Map<BigQueryRpc.Option,​?> options)
        Description copied from interface: BigQueryRpc
        Tests whether the caller holds the provided permissions for the specified resource. Returns the subset of permissions the caller actually holds.
        Specified by:
        testIamPermissions in interface BigQueryRpc