Google BigQuery
Collect and forward analytics events to your BigQuery tables.
Find it on GitHub: /edgee-cloud/bigquery-component
BigQuery is a fully-managed, serverless data warehouse that enables scalable analysis over petabytes of data. It is a powerful solution for analytics and business intelligence.
Event Mapping
Here’s how Edgee events map to BigQuery records:
Edgee Event | BigQuery Record | Description |
---|---|---|
Page | A new record in the configured table | Full JSON dump of the Page event |
Track | A new record in the configured table | Full JSON dump of the Track event |
User | A new record in the configured table | Full JSON dump of the User event |
Getting Started
To integrate BigQuery into your Edgee project:
- Open the Edgee console and navigate to your project’s Components.
- Select “Add a component” and choose
edgee/bigquery
from the list of available components. - Enter your BigQuery configuration and credentials, and click Save.
- Create a new table in BigQuery with the correct schema (see next section).
- Once the component has been configured, you are ready to send new records to BigQuery.
Creating the BigQuery Table
Before ingesting events, you’ll need to create a new table with the following schema:
JSON Fields
New records are ingested individually using BigQuery’s streaming API. If your BigQuery table supports JSON types, both context and data will contain additional JSON sub-fields, whose schema is automatically inferred at runtime.
Please note that:
- The sub-fields under context are always the same, so you can use queries such as
SELECT context.client.ip AS ip FROM your-project-id.your-dataset-id.your-table-id
. - The sub-fields under data depend on the value of event_type, so you can use queries such as:
SELECT data.track.name FROM your-project-id.your-dataset-id.your-table-id WHERE event_type = 'track'
SELECT data.page.path FROM your-project-id.your-dataset-id.your-table-id WHERE event_type = 'page'
Component Name
When configuring the component in your Edgee Data Layer or within SDK calls, use edgee/bigquery as the component name:
For more details on BigQuery implementation, refer to the official BigQuery documentation.