Introduction to BigQuery jobs
This page provides an overview of BigQuery jobs.
BigQuery jobs
Jobs are actions that BigQuery runs on your behalf to load data, export data, query data, or copy data.
When you use the Google Cloud console or the bq tool to perform one of these jobs, a job resource is automatically created, scheduled, and run. You can also programmatically create a load, export, query, or copy job. When you create a job programmatically, BigQuery schedules and runs the job for you.
Because jobs can potentially take a long time to complete, they run asynchronously and can be polled for their status. Shorter actions, such as listing resources or getting metadata, are not managed by a job resource.
Before you begin
Grant Identity and Access Management (IAM) roles that give users the necessary permissions to perform each task in this document.
Required permissions
To run a BigQuery job, you need the bigquery.jobs.create
IAM permission. This permission lets you run jobs programmatically and grants permissions for jobs that BigQuery runs automatically on your behalf.
Each of the following predefined IAM roles includes the permissions that you need in order to run a job:
roles/bigquery.user
roles/bigquery.jobUser
roles/bigquery.admin
Additionally, when you create a job, you are automatically granted the following permissions for that job:
bigquery.jobs.get
bigquery.jobs.update
For more information about IAM roles and permissions in BigQuery, see Predefined roles and permissions.
Quota policy
For information about job quotas, see the documentation for the job type on the Quotas and limits page:
Pricing
Every job is associated with a specific project that you specify. The billing account attached to the associated project is billed for any usage incurred by the job. If you share access to a project, any jobs run in the project are also billed to the billing account.
For example, when running a query job,
the cost is billed to the project that runs the job. Thus when you view the job
ID of a query job with the format of <project_id>:<region>.<job_id>
, the
project_id
is the ID of the project billed for the query.
For more information, see the Pricing page.
What's next
- Learn how to run jobs programmatically.
- Learn how to manage jobs.