BigQuery Exports

Introduction

BigQuery is a fully managed, serverless data warehouse available on the Google Cloud Platform (GCP). It allows you to perform complex analytics on terabytes of data in real time without managing infrastructure

MoEngage <> BigQuery

The MoEngage and BigQuery integration uses MoEngage Google Cloud Storage (GCS) Data Imports and Exports to transfer user and event data to Google BigQuery for advanced analytics.

Integration 

library_add_check

Prerequisites

  • Ensure you have a BigQuery account with the required permissions to create/edit BigQuery instances, roles, and policies.
  • It is optional to create a new user. However, you must have access to create a new user in your BigQuery database.
  • If your system requires IP whitelisting, you must allowlist MoEngage IPs. For more information, refer here.
  • Ensure you have a BigQuery Connection in the App marketplace.
    Exports to BigQuery are part of the Streams add-on. Contact your MoEngage customer success manager (CSM) to enable this feature for your account.
  • If not done already, you must set up a MoEngage <> BigQuery integration for your account. For more information, refer to the BigQuery Integration help doc.

Export Events from MoEngage to BigQuery

Step 1: Ensure Your User's Assigned Role Has Required Permissions

To successfully set up and execute a BigQuery export, your service account or user must have the following permissions based on the action being performed:

  • To Create a Connection: To establish a new BigQuery connection within the MoEngage App Marketplace, the user must have the BigQuery Data Viewer and BigQuery Job User roles. This allows MoEngage to validate the project and dataset details. For more information, refer here.
  • To Perform Exports: To execute the actual data transfer, your service account must be assigned the BigQuery Data Editor role. This grants MoEngage the necessary permissions to read and write data to your specific BigQuery tables.

Step 2: Add a New BigQuery Export in the MoEngage App Marketplace

info

Information

  • For a full list of events and attributes, refer to the Data Exports Glossary.
  • The event_time of exported events is always in UTC.
  • MoEngage does not currently support exporting historical data.

To add a new BigQuery export, perform the following steps:

  1. On the left navigation menu in the MoEngage UI, click App marketplace.
  2. On the App Marketplace page, search for BigQuery.
  3. Click the Google BigQuery tile.
  4. On the Google BigQuery page, go to the Integrate tab and click +Add Export.
  5. Enter the following details:
    Field Required Description
    Export name Yes Type a name for the BigQuery export. Ensure your export name contains at least three characters.
    BigQuery connection

    Yes

    Select your BigQuery connection.

    Dataset ID

    Yes

    Select the specific dataset in BigQuery where your data will be exported.
    Table name 

    Optional

    Enter the name for the export table. If left blank, MoEngage creates a name for you with the prefix moe_events.

    Note: To avoid errors, allow MoEngage to automatically create this table.

    User Properties

    Optional

    Select the specific user properties you want to include in the export.

    Select events Yes Select the events to export to BigQuery. You can choose to export all events, including existing and new events coming into MoEngage, or manually select specific events to export.

  6. Click Save export.

Now, MoEngage populates the newly created table with events every hour.

Export Frequency

MoEngage populates the data hourly.

Sample Table Structure

If you do not specify a table name in the export configuration, MoEngage creates the following table in your dataset:

moe_events_<table_creation_timestamp>: MoEngage populates all your events in this table. All exports set up under a single connection are appended to the same table.

The overall structure of the table will remain the same for all event types. Any new user property or event attribute exported will be included in user_attributes or event_attributes, respectively. All events are populated in a single table containing the necessary information, such as event names and times, for easy analysis.

Field Type NULL
app_name VARCHAR NOT NULL
event_name VARCHAR NOT NULL
event_code VARCHAR NOT NULL
event_uuid VARCHAR NOT NULL
event_time TIMESTAMP NOT NULL
event_type VARCHAR NOT NULL
event_source VARCHAR NOT NULL
uid VARCHAR NULL
user_attributes_moengage_user_id VARCHAR NULL
device_attributes_moengage_device_id VARCHAR NULL
push_id VARCHAR NULL
email_address VARCHAR NULL
mobile_number VARCHAR NULL
event_attributes_app_version VARCHAR NULL
event_attributes_sdk_version VARCHAR NULL
event_attributes_platform VARCHAR NULL
event_attributes_campaign_id VARCHAR NULL
event_attributes_campaign_name VARCHAR NULL
event_attributes_campaign_type VARCHAR NULL
event_attributes_campaign_channel VARCHAR NULL
event_attributes_readable_campaign_id VARCHAR NULL
event_attributes_parent_campaign_id VARCHAR NULL
event_attributes_parent_flow_id VARCHAR NULL
event_attributes_parent_flow_name VARCHAR NULL
event_attributes_variation_id VARCHAR NULL
event_attributes_locale_id VARCHAR NULL
event_attributes_locale_name VARCHAR NULL
event_attributes_url VARCHAR NULL
event_attributes_timestamp TIMESTAMP NULL
event_attributes_first_session BOOLEAN NULL
event_attributes_logged_in_status STRING NULL
event_attributes JSON NULL
user_attributes JSON NULL
device_attributes JSON NULL

Frequently Asked Questions

arrow_drop_down How soon will I start getting the data?

It typically takes up to 30 minutes for the automated data exports to be set up for your account and for you to start seeing data there.

arrow_drop_down Can I export additional events at a later time?

Yes, if you need to export new events at a later time, you can always edit your configuration on the App Marketplace and get the new events added to your exports.

arrow_drop_down Can I export historical data using Automated Data Exports?

As of now, you cannot export historical data using Automated Data Exports. Once configured, you will start seeing data for each event from the time you enabled your exports.

arrow_drop_down Is there any pricing involved for Automated Data Exports?

If your billing plan does not cover this already and you need to get this enabled at a later time, you would need to work with your Customer Success Manager to get this included in your billing plan. Based on the amount of data that MoEngage will place in your Data warehouse/Partner/API on a monthly basis, this could lead to additional charges.

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?