Skip to content

MotherDuck

EdgeKit can load your events into a table in your own MotherDuck database, every 15 minutes, and your EdgeKit records beside them. You create the database and a token, and give EdgeKit one connection URI. See Warehouse for the load itself.

  1. A database. EdgeKit loads into edgekit.events in it unless you name another <schema>.<table>. The export schema goes into schema edgekit_v1 of the same database.
  2. An access token that can write to that database. EdgeKit uses it for nothing else. A MotherDuck token cannot be limited to one database, so create it for a service account that owns that database and nothing else.

One URI:

md://<database>?token=<access token>

The scheme must be md://: a URI starting with motherduck://, or anything else, is refused before any load runs. Give EdgeKit the table name too if it is not edgekit.events. The URI holds your token. EdgeKit stores it for your organization, and there is no console screen for it.

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.
  • 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