Enabling the BigQuery Data Transfer Service

To use the BigQuery Data Transfer Service, you must complete the following steps as a project Owner:

  • Create a project and enable the BigQuery API
  • Enable the BigQuery Data Transfer Service

For more information on IAM roles, see Understanding roles.

Creating a project and enabling the BigQuery API

Before using the BigQuery Data Transfer Service, you must create a project and, in most cases, enable billing on that project. You can use an existing project with the BigQuery Data Transfer Service, or you can create a new one. If you are using an existing project, you may also need to enable the BigQuery API.

To create a project and enable the BigQuery API:

  1. In the GCP Console, go to the Manage resources page.

    Go to the Manage resources page

  2. Select a project, or click Create and create a new GCP project.

  3. You will need to enable billing on your project if you want to transfer data from any of these sources: Enabling billing is only required once per project, even if you are transferring data from multiple sources. You may also need to enable billing if you need to query the data in BigQuery.

    Comprueba que la facturación esté habilitada en tu proyecto.

    Descubre cómo puedes habilitar la facturación

  4. BigQuery is automatically enabled in new projects. To activate BigQuery in an existing project, {% dynamic if "no_credentials" in setvar.task_params %} {% dynamic setvar credential_type %}NO_AUTH{% dynamic endsetvar %} {% dynamic if not setvar.redirect_url %} {% dynamic setvar redirect_url %}https://console.cloud.google.com{% dynamic endsetvar %} {% dynamic endif %}{% dynamic endif %} {% dynamic if setvar.in_henhouse_no_auth_whitelist %} {% dynamic if not setvar.credential_type %}{% dynamic setvar credential_type %}NO_AUTH{% dynamic endsetvar %} {% dynamic endif %} {% dynamic elif setvar.in_henhouse_service_account_whitelist %} {% dynamic if not setvar.credential_type %}{% dynamic setvar credential_type %}SERVICE_ACCOUNT{% dynamic endsetvar %} {% dynamic endif %}{% dynamic endif %} {% dynamic if not setvar.service_account_roles and setvar.credential_type == "SERVICE_ACCOUNT" %} {% dynamic setvar service_account_roles %} {% dynamic endsetvar %} {% dynamic endif %} {% dynamic setvar console %} {% dynamic if "no_steps" not in setvar.task_params %}
  5. {% dynamic endif %} {% dynamic if setvar.api_list %} {% dynamic if setvar.in_henhouse_no_auth_whitelist or setvar.in_henhouse_service_account_whitelist %} Configurar un proyecto de GCP Console.

    Configurar un proyecto

    Haz clic para realizar alguna de las siguientes acciones:

    • Crear o seleccionar un proyecto.
    • Habilitar las {% dynamic if setvar.api_names %}{% dynamic print setvar.api_names %}{% dynamic else %}{% dynamic endif %}{% dynamic if "," in setvar.api_list %} API{% dynamic elif "API" in setvar.api_names %}{% dynamic else %} API{% dynamic endif %} necesarias para el proyecto.
    • {% dynamic if setvar.credential_type == 'SERVICE_ACCOUNT' %}
    • Crear una cuenta de servicio.
    • Descargar una clave privada como JSON.
    • {% dynamic endif %}

    Puedes visualizar y administrar estos recursos en GCP Console en cualquier momento.

    {% dynamic else %}{% dynamic if "no_text" not in setvar.task_params %} Habilita las {% dynamic if setvar.api_names %}{% dynamic print setvar.api_names %}{% dynamic else %}{% dynamic endif %}{% dynamic if "," in setvar.api_list %} API{% dynamic elif "API" in setvar.api_names %}{% dynamic else %} API{% dynamic endif %} necesarias. {% dynamic endif %}

    Habilita las {% dynamic if "," in setvar.api_list %} API{% dynamic else %} API{% dynamic endif %}

    {% dynamic endif %}{% dynamic endif %}{% dynamic if "no_steps" not in setvar.task_params %}
  6. {% dynamic endif %}{% dynamic endsetvar %}{% dynamic print setvar.console %}

Enabling the BigQuery Data Transfer Service

Before you can create a transfer, you must enable the BigQuery Data Transfer Service. To enable the BigQuery Data Transfer Service, you must be granted the Owner role for your project.

To enable the BigQuery Data Transfer Service:

  1. Go to the classic BigQuery web UI.

    Go to the BigQuery web UI

  2. Click Transfers.

  3. Click Enable to grant permissions to the BigQuery Data Transfer Service. The first time you enable transfers in a project, you are required to grant permissions to the BigQuery Data Transfer Service. After permissions are granted, you are not prompted again.

    Enable transfers

Granting bigquery.admin access

All users that will create transfers must be granted the bigquery.admin predefined IAM role. The bigquery.admin role includes the following BigQuery Data Transfer Service permissions:

  • bigquery.transfers.update
  • bigquery.transfers.get

The bigquery.admin role also includes bigquery.datasets.update permissions. You must have bigquery.datasets.update permissions in order to write data to the transfer's destination dataset.

For more information on IAM roles in BigQuery, see Access control.

To grant bigquery.admin access to a user or Google group:

Console

  1. Open the IAM page in the GCP Console

    Open the IAM page

  2. Click Select a project.

  3. Select a project and click Open.

  4. Click Add to add new members to the project and set their permissions.

  5. In the Add members dialog:

    • For Members, enter the email address of the user or group.
    • In the Select a role drop-down, click BigQuery > BigQuery Admin.
    • Click Add.

      Grant admin

Command-line

You can use the gcloud command-line tool to grant a user or group the bigquery.admin role.

To add a single binding to your project's IAM policy, type the following command. To add a user, supply the --member flag in the format user:user@example.com. To add a group, supply the --member flag in the format group:group@example.com.

gcloud projects add-iam-policy-binding [PROJECT_ID] --member [GROUP/USER]:[ADDRESS] --role roles/bigquery.admin

Where:

  • [PROJECT_ID] is your project ID.
  • [GROUP/USER] is either group or user.
  • [ADDRESS] is the user or group's email address.

For example:

gcloud projects add-iam-policy-binding myproject --member group:group@example.com --role roles/bigquery.admin

The command outputs the updated policy:

    bindings:
    - members:
      - group:group@example.com
        role: roles/bigquery.admin
    

Next steps

After enabling the BigQuery Data Transfer Service, create a transfer for your data source.

¿Te ha resultado útil esta página? Enviar comentarios:

Enviar comentarios sobre...

Si necesitas ayuda, visita nuestra página de asistencia.