Skip to main content

Google BigQuery Destination

Written by Emma Poo
  1. Use your existing Cloud Storage Bucket or create one if needed.

  2. Create a Custom IAM Role.

  3. Assign BigQuery and GCS Roles to your service account. Ensure your service account has the necessary roles to run the BigQuery load job.

    • BigQuery Roles:

      • BigQuery Data Editor: Grants permissions to read, create, update, and delete tables.

      • BigQuery Job User: Grants permissions to run jobs within the project.

        # Assign the BigQuery Data Editor role
        gcloud projects add-iam-policy-binding your-project-id \
        --member=user:[email protected] \
        --role=roles/bigquery.dataEditor

        # Assign the BigQuery Job User role
        gcloud projects add-iam-policy-binding your-project-id \
        --member=user:[email protected] \
        --role=roles/bigquery.jobUser

  4. Create a new Service Account and assign Roles.

  5. Grant Permissions to the Bucket.

  6. Record Credentials.

    • Securely download and record the JSON key file for the new service account.

Permissions Summary

BigQuery Permissions

  • bigquery.jobs.create

  • bigquery.tables.update

  • bigquery.tables.create

  • bigquery.tables.get

  • bigquery.tables.delete

Google Cloud Storage Permissions

  • storage.buckets.get

  • storage.buckets.list

  • storage.objects.get

  • storage.objects.create

  • storage.objects.delete

Did this answer your question?