Skip to content

BigQuery

EdgeKit can load your events into a BigQuery table in your own Google Cloud project, every 15 minutes, and your EdgeKit records beside them. You create two datasets and a service account, and give EdgeKit one connection URI. See Warehouse for the load itself.

  1. A dataset, such as edgekit. EdgeKit loads into edgekit.events unless you name another <dataset>.<table>. Always name a dataset: EdgeKit stages each load in the table’s own dataset.
  2. A second dataset, edgekit_v1, in the same location. It holds the export schema.
  3. A service account with BigQuery Data Editor on both datasets and BigQuery Job User on the project. EdgeKit creates the tables, adds their columns and stages each load there.
  4. A JSON key for the service account.

One URI, with the whole key file base64-encoded:

bigquery://<project id>?credentials_base64=<base64-encoded key file>&location=<the dataset's location>

Give EdgeKit the table name too if it is not edgekit.events. The URI holds your key. EdgeKit stores it for your organization, and there is no console screen for it. A URI that does not start with bigquery:// is refused before any load runs.

EdgeKit loads from the moment it has the URI. To stop, ask EdgeKit to remove it: loads stop and the table stays.

  • Every 15 minutes, EdgeKit reads the archive files written between 30 and 2 minutes before the run. Runs overlap, so each file is read at least once and one missed run loses nothing. A run with no new file loads no events, but still loads the export schema.
  • Valid events only, from all your sites, one row per event, into one table. Each row’s site is in its contexts_cloud_edgekit_tenant_1 column. Bad rows are never loaded.
  • Every event column, plus one JSON column per schema major for its self-describing events, and one for its entities. A column is added the first time a load carries it; earlier rows hold null in it. See Warehouse for the columns. The table also gets one column with the time each row’s archive file was written, which EdgeKit uses to bound each merge.
  • Merged on event_id. Loading the same window again changes nothing. A duplicate of an event whose first copy came in an earlier window can stay.
  • Then the export schema: each run merges what changed into the edgekit_v1 tables that grow with your users, and replaces the rest whole. Once a night, every table is replaced whole. See Export schema.
  • One warehouse for your organization.
  • Loads start when you connect. EdgeKit then backfills the events archived before then, one day at a time, from the start of your archive or a date you choose. A gap after two or more missed runs is filled the same way.
  • The copy is yours. EdgeKit never deletes from your events table, and erasing a user in EdgeKit does not reach it. Retention and erasure there are yours. The rows carry the personal data your events carry. An erasure reaches the edgekit_v1 tables: the user’s email address is nulled on the next load, and their profiles and own trait values leave within a day.

edgekit.ai