Introduction to BigQuery jobs
This page provides an overview of BigQuery jobs.
When you use the Cloud console or the
bq command-line tool to load, export,
query, or copy data, 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 execute 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.
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:
Additionally, when you create a job, you are automatically granted the following permissions for that job:
For more information about IAM roles and permissions in BigQuery, see Predefined roles and permissions.
For information about job quotas, see the documentation for the job type on the Quotas and limits page:
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 is the ID of the project billed for the query.
For more information, see the Pricing page.