GoogleApi.BigQuery.V2.Api.Jobs (google_api_big_query v0.70.1) View Source

API calls for all endpoints tagged Jobs.

Link to this section Summary

Functions

Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs.

Requests the deletion of the metadata of a job. This call returns when the job's metadata is deleted.

Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role.

Starts a new asynchronous job. Requires the Can View project role.

Starts a new asynchronous job. Requires the Can View project role.

Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property.

Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.

Link to this section Functions

Link to this function

bigquery_jobs_cancel(connection, project_id, job_id, optional_params \\ [], opts \\ [])

View Source

Specs

bigquery_jobs_cancel(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.BigQuery.V2.Model.JobCancelResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs.

Parameters

  • connection (type: GoogleApi.BigQuery.V2.Connection.t) - Connection to server
  • project_id (type: String.t) - [Required] Project ID of the job to cancel
  • job_id (type: String.t) - [Required] Job ID of the job to cancel
  • optional_params (type: keyword()) - Optional parameters
    • :alt (type: String.t) - Data format for the response.
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (type: String.t) - Deprecated. Please use quotaUser instead.
    • :location (type: String.t) - The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.BigQuery.V2.Model.JobCancelResponse{}} on success
  • {:error, info} on failure
Link to this function

bigquery_jobs_delete(connection, project_id, job_id, optional_params \\ [], opts \\ [])

View Source

Specs

bigquery_jobs_delete(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}

Requests the deletion of the metadata of a job. This call returns when the job's metadata is deleted.

Parameters

  • connection (type: GoogleApi.BigQuery.V2.Connection.t) - Connection to server
  • project_id (type: String.t) - Required. Project ID of the job for which metadata is to be deleted.
  • job_id (type: String.t) - Required. Job ID of the job for which metadata is to be deleted. If this is a parent job which has child jobs, the metadata from all child jobs will be deleted as well. Direct deletion of the metadata of child jobs is not allowed.
  • optional_params (type: keyword()) - Optional parameters
    • :alt (type: String.t) - Data format for the response.
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (type: String.t) - Deprecated. Please use quotaUser instead.
    • :location (type: String.t) - The geographic location of the job. Required. See details at: https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %{}} on success
  • {:error, info} on failure
Link to this function

bigquery_jobs_get(connection, project_id, job_id, optional_params \\ [], opts \\ [])

View Source

Specs

bigquery_jobs_get(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.BigQuery.V2.Model.Job.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role.

Parameters

  • connection (type: GoogleApi.BigQuery.V2.Connection.t) - Connection to server
  • project_id (type: String.t) - [Required] Project ID of the requested job
  • job_id (type: String.t) - [Required] Job ID of the requested job
  • optional_params (type: keyword()) - Optional parameters
    • :alt (type: String.t) - Data format for the response.
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (type: String.t) - Deprecated. Please use quotaUser instead.
    • :location (type: String.t) - The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.BigQuery.V2.Model.Job{}} on success
  • {:error, info} on failure
Link to this function

bigquery_jobs_get_query_results(connection, project_id, job_id, optional_params \\ [], opts \\ [])

View Source

Specs

bigquery_jobs_get_query_results(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.BigQuery.V2.Model.GetQueryResultsResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Retrieves the results of a query job.

Parameters

  • connection (type: GoogleApi.BigQuery.V2.Connection.t) - Connection to server
  • project_id (type: String.t) - [Required] Project ID of the query job
  • job_id (type: String.t) - [Required] Job ID of the query job
  • optional_params (type: keyword()) - Optional parameters
    • :alt (type: String.t) - Data format for the response.
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (type: String.t) - Deprecated. Please use quotaUser instead.
    • :location (type: String.t) - The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
    • :maxResults (type: integer()) - Maximum number of results to read
    • :pageToken (type: String.t) - Page token, returned by a previous call, to request the next page of results
    • :startIndex (type: String.t) - Zero-based index of the starting row
    • :timeoutMs (type: integer()) - How long to wait for the query to complete, in milliseconds, before returning. Default is 10 seconds. If the timeout passes before the job completes, the 'jobComplete' field in the response will be false
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.BigQuery.V2.Model.GetQueryResultsResponse{}} on success
  • {:error, info} on failure
Link to this function

bigquery_jobs_insert(connection, project_id, optional_params \\ [], opts \\ [])

View Source

Specs

bigquery_jobs_insert(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.BigQuery.V2.Model.Job.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Starts a new asynchronous job. Requires the Can View project role.

Parameters

  • connection (type: GoogleApi.BigQuery.V2.Connection.t) - Connection to server
  • project_id (type: String.t) - Project ID of the project that will be billed for the job
  • optional_params (type: keyword()) - Optional parameters
    • :alt (type: String.t) - Data format for the response.
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (type: String.t) - Deprecated. Please use quotaUser instead.
    • :body (type: GoogleApi.BigQuery.V2.Model.Job.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.BigQuery.V2.Model.Job{}} on success
  • {:error, info} on failure
Link to this function

bigquery_jobs_insert_iodata(connection, project_id, upload_type, metadata, data, optional_params \\ [], opts \\ [])

View Source

Specs

bigquery_jobs_insert_iodata(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  GoogleApi.BigQuery.V2.Model.Job.t(),
  iodata(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.BigQuery.V2.Model.Job.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Starts a new asynchronous job. Requires the Can View project role.

Parameters

  • connection (type: GoogleApi.BigQuery.V2.Connection.t) - Connection to server
  • project_id (type: String.t) - Project ID of the project that will be billed for the job
  • upload_type (type: String.t) - Upload type. Must be "multipart".
  • metadata (type: GoogleApi.BigQuery.V2.Model.Job.t) - object metadata
  • data (type: iodata) - Content to upload, as a string or iolist
  • optional_params (type: keyword()) - Optional parameters
    • :alt (type: String.t) - Data format for the response.
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (type: String.t) - Deprecated. Please use quotaUser instead.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.BigQuery.V2.Model.Job{}} on success
  • {:error, info} on failure
Link to this function

bigquery_jobs_insert_resumable(connection, project_id, upload_type, optional_params \\ [], opts \\ [])

View Source

Specs

bigquery_jobs_insert_resumable(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}

Starts a new asynchronous job. Requires the Can View project role.

Parameters

  • connection (type: GoogleApi.BigQuery.V2.Connection.t) - Connection to server
  • project_id (type: String.t) - Project ID of the project that will be billed for the job
  • upload_type (type: String.t) - Upload type. Must be "resumable".
  • optional_params (type: keyword()) - Optional parameters
    • :alt (type: String.t) - Data format for the response.
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (type: String.t) - Deprecated. Please use quotaUser instead.
    • :body (type: GoogleApi.BigQuery.V2.Model.Job.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %{}} on success
  • {:error, info} on failure
Link to this function

bigquery_jobs_insert_simple(connection, project_id, upload_type, metadata, data, optional_params \\ [], opts \\ [])

View Source

Specs

bigquery_jobs_insert_simple(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  GoogleApi.BigQuery.V2.Model.Job.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.BigQuery.V2.Model.Job.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Starts a new asynchronous job. Requires the Can View project role.

Parameters

  • connection (type: GoogleApi.BigQuery.V2.Connection.t) - Connection to server
  • project_id (type: String.t) - Project ID of the project that will be billed for the job
  • upload_type (type: String.t) - Upload type. Must be "multipart".
  • metadata (type: GoogleApi.BigQuery.V2.Model.Job.t) - object metadata
  • data (type: String.t) - Path to file containing content to upload
  • optional_params (type: keyword()) - Optional parameters
    • :alt (type: String.t) - Data format for the response.
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (type: String.t) - Deprecated. Please use quotaUser instead.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.BigQuery.V2.Model.Job{}} on success
  • {:error, info} on failure
Link to this function

bigquery_jobs_list(connection, project_id, optional_params \\ [], opts \\ [])

View Source

Specs

bigquery_jobs_list(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.BigQuery.V2.Model.JobList.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property.

Parameters

  • connection (type: GoogleApi.BigQuery.V2.Connection.t) - Connection to server
  • project_id (type: String.t) - Project ID of the jobs to list
  • optional_params (type: keyword()) - Optional parameters
    • :alt (type: String.t) - Data format for the response.
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (type: String.t) - Deprecated. Please use quotaUser instead.
    • :allUsers (type: boolean()) - Whether to display jobs owned by all users in the project. Default false
    • :maxCreationTime (type: String.t) - Max value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created before or at this timestamp are returned
    • :maxResults (type: integer()) - Maximum number of results to return
    • :minCreationTime (type: String.t) - Min value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created after or at this timestamp are returned
    • :pageToken (type: String.t) - Page token, returned by a previous call, to request the next page of results
    • :parentJobId (type: String.t) - If set, retrieves only jobs whose parent is this job. Otherwise, retrieves only jobs which have no parent
    • :projection (type: String.t) - Restrict information returned to a set of selected fields
    • :stateFilter (type: list(String.t)) - Filter for job state
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.BigQuery.V2.Model.JobList{}} on success
  • {:error, info} on failure
Link to this function

bigquery_jobs_query(connection, project_id, optional_params \\ [], opts \\ [])

View Source

Specs

bigquery_jobs_query(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.BigQuery.V2.Model.QueryResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.

Parameters

  • connection (type: GoogleApi.BigQuery.V2.Connection.t) - Connection to server
  • project_id (type: String.t) - Project ID of the project billed for the query
  • optional_params (type: keyword()) - Optional parameters
    • :alt (type: String.t) - Data format for the response.
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (type: String.t) - Deprecated. Please use quotaUser instead.
    • :body (type: GoogleApi.BigQuery.V2.Model.QueryRequest.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.BigQuery.V2.Model.QueryResponse{}} on success
  • {:error, info} on failure