Google Play Transfers

The BigQuery Data Transfer Service for Google Play allows you to automatically schedule and manage recurring load jobs for Google Play reporting data.

Supported Reports

The BigQuery Data Transfer Service for Google Play currently supports the following monthly reporting options:

Detailed Reports

Aggregated Reports

For information on how Google Play reports are transformed into BigQuery tables, see Google Play Report Transformations.

Reporting option Support
Supported API version

N/A

Schedule

Daily, at the time the transfer is first created (default)

You can configure the time of day.

Refresh window

Last 7 days

Not configurable

Maximum backfill duration

No limit

While Google Play has no known data retention limits, the BigQuery Data Transfer Service has limits on how many days can be requested in a single backfill. For information on backfills, see Set up a backfill.

Before you begin

Before you create a Google Play transfer:

  • Verify that you have completed all actions required to enable the BigQuery Data Transfer Service.
  • Create a BigQuery dataset to store the Google Play data.
  • Ensure that you have the following permissions:
    • BigQuery: You must have the bigquery.transfers.update permissions. The bigquery.admin predefined, project-level IAM role includes bigquery.transfers.update permissions. For more information on IAM roles in BigQuery, see Access Control.
    • Google Play: You must have reporting access in the Google Play Console

      The Google Cloud team does NOT have the ability to generate or grant access to Google Play files on your behalf. See the page Contact Google Play support for help accessing Google Play files.

  • Find your Cloud Storage bucket:
    • In the Google Play Console, select any report, such as Reviews. You'll find the ID for your Cloud Storage bucket near the bottom of the page. Your bucket ID begins with gs://. For example, for the Reviews report, you'll see:
      gs://pubsite_prod_rev_01234567890987654321/reviews
      To set up your transfer, you'll copy only the unique ID that comes between gs:// and /reviews:
      pubsite_prod_rev_01234567890987654321
  • If you intend to create transfers using the BigQuery web UI, allow pop-ups from bigquery.cloud.google.com so you can view the permissions window. You must grant the BigQuery Data Transfer Service permission to manage your Google Play reporting data for the transfer to succeed.
  • Transfer run notifications are currently in Alpha. If you intend to setup transfer run notifications for Cloud Pub/Sub, you must have pubsub.topics.setIamPolicy permissions. Cloud Pub/Sub permissions are not required if you just set up email notifications. For more information, see BigQuery Data Transfer Service Run Notifications.

Setting up a Google Play transfer

Setting up a Google Play transfer requires a:

  • Cloud Storage bucket. Steps for locating your Cloud Storage bucket are described in Before you begin. Your Cloud Storage bucket begins with pubsite_prod_rev. For example: pubsite_prod_rev_01234567890987654321.
  • Table Suffix: A user-friendly name for all data sources loading into the same dataset. The suffix is used to prevent separate transfers from writing to the same tables. The table suffix must be unique across all transfers that load data into the same dataset, and the suffix should be short to minimize the length of the resulting table name.

To set up a Google Play transfer:

Web UI

  1. Go to the BigQuery web UI.

    Go to the BigQuery web UI

  2. Click Transfers.

  3. Click Add Transfer.

  4. On the New Transfer page:

    • For Source, choose Google Play.
    • For Display name, enter a name for the transfer such as 'My Transfer'. The transfer name can be any value that allows you to easily identify the transfer if you need to modify it later.
    • For Schedule, leave the default value (every 24 hours at transfer creation time) or click Edit and change the time.

      Google Play transfer custom schedule

    • For Destination dataset, choose the appropriate dataset.

    • For Cloud Storage bucket, enter your Cloud Storage bucket.

    • For Table suffix, enter a suffix such as 'MT' (for 'My Transfer').

      Google Play transfer default schedule

    • (Optional) Expand the Advanced section and configure run notifications for your transfer. Transfer run notifications are currently in Alpha.

      • For Cloud Pub/Sub topic, enter your topic name, for example, 'projects/myproject/topics/mytopic'.
      • Check Send email notifications to allow email notifications of transfer run failures.
      • Don't check Disabled when setting up a transfer. See Working with transfers to disable existing transfers.

        Cloud Pub/Sub topic

  5. Click Add. Note that by clicking the Add button you are granting Google Play Reports read and write access to the destination BigQuery dataset you selected.

  6. When prompted, click Allow to give the BigQuery Data Transfer Service permission to view your Google Play reporting data and to access and manage the data in BigQuery. You must allow pop-ups from bigquery.cloud.google.com to view the permissions window.

    Allow transfer

Command-line

Enter the bq mk command and supply the transfer creation flag — --transfer_config. The following flags are also required:

  • --target_dataset
  • --display_name
  • --params
  • --data_source

    bq mk --transfer_config --project_id=[PROJECT_ID] --target_dataset=[DATASET] --display_name=[NAME] --params='[PARAMETERS]' --data_source=[DATA_SOURCE]
    

Where:

  • --project_id is your project ID. If --project_id isn't specified, the default project is used.
  • --target_dataset is the target dataset for the transfer configuration.
  • --display_name is the display name for the transfer configuration. The transfer name can be any value that allows you to easily identify the transfer if you need to modify it later.
  • --params contains the parameters for the created transfer configuration in JSON format. For example: --params='{"param":"param_value"}'. For Google Play, you must supply the bucket and table_suffix, parameters. bucket is the Cloud Storage bucket that contains your Play report files.
  • --data_source is the data source: play.

For example, the following command creates a Google Play transfer named My Transfer using Cloud Storage bucket pubsite_prod_rev_01234567890987654321 and target dataset mydataset. The transfer is created in the default project:

bq mk --transfer_config --target_dataset=mydataset --display_name='My Transfer' --params='{"bucket":"pubsite_prod_rev_01234567890987654321","table_suffix":"MT"}' --data_source=play

The first time you run the command, you will receive a message like the following:

[URL omitted] Please copy and paste the above URL into your web browser and follow the instructions to retrieve an authentication code.

Follow the instructions in the message and paste the authentication code on the command line.

API

Use the projects.locations.transferConfigs.create method and supply an instance of the TransferConfig resource.

Troubleshooting Google Play transfer set up

If you are having issues setting up your transfer, see Troubleshooting BigQuery Data Transfer Service Transfer Setup.

Querying your data

When your data is transferred to BigQuery, the data is written to ingestion-time partitioned tables. For more information, see Introduction to Partitioned Tables.

If you query your tables directly instead of using the auto-generated views, you must use the _PARTITIONTIME pseudo-column in your query. For more information, see Querying Partitioned Tables.

Was this page helpful? Let us know how we did:

Send feedback about...

Need help? Visit our support page.