Onboarding

Set up events

Events are the raw material of the whole model: properties and metrics are built from them. This step points Asemic at your raw event tables and tells it, once, how they’re shaped. Asemic detects as much as it can; you review and correct.

With a warehouse connected and no events defined, the Data Model page shows one card: “Set up your events”. It opens the “Set up events” wizard. You can rerun it any time later from the page’s ⋮ menu → “Generate from tables…”.

Step 1 of 2 — Source

  • “Events dataset / schema”: the dataset holding your raw event tables, for example game_raw. Pick from the dropdown of visible datasets or type a name directly.

  • “Load tables”: optional; Continue loads them automatically.

  • “How are the events stored?”: the first real decision. Two layouts exist in the wild:

    • “One table per event”: each event type has its own table: login, purchase, registration, battle_started. Common when a data pipeline writes one stream per event.
    • “One big events table”: every event lands in a single table, and a column such as event_name says which one each row is. Common with SDK exports and event buses.

    Pick whichever matches your dataset; the next screen adapts to the choice.

  • “Data model schema”: the dataset where Asemic writes the model it derives. It must be writable by the connection; “Test destination” checks that the connection can run queries, read your events dataset, create tables in this one, and that both are in the same location (details).

  • “Active days”: how long a user stays in the daily entity table after their last activity. Leave the default of 90 unless you have a reason; the tradeoff is explained in Materialization. Both this and the data model schema can be changed later from the page’s ⋮ menu → “Model settings…”.

Step 2 of 2 — Events

If you chose “One table per event”

You get a prepopulated table: one row per discovered event table, with columns Source table, Event id, Role, User id, Timestamp, Date, every value auto-detected and overridable via dropdowns.

Date is optional. Leave it empty and Asemic derives the day as DATE(timestamp). If your table has a physical date column, prefer it: on partitioned tables it makes daily queries meaningfully cheaper.

If you chose “One big events table”

Pick the “Events table” and the “Event type column”, then select “Scan events”. Asemic inspects the last 7 days of data and:

  • lists the event types it found, and
  • per event type, leaves out columns that are always empty for that type.

Each generated event gets a row filter on the event type column, such as event_name = 'purchase', which is what makes it that event (see Refine an event).

If scanning isn’t available in your setup, enter the event types manually; everything else works the same.

Roles

The Role column is the most consequential choice on this screen. A role is shorthand for the event’s tags, which decide which starter metrics the event generates. Tags stay editable per event afterwards; see Event roles and tags.

RoleMeaningWhat it unlocks
UserA user actionCounts toward activity (DAU/MAU); the default
RegistrationThe preferred registration row on a user’s first dayCohorts, retention, LTV
PaymentCarries the transaction amountRevenue metrics
SystemSystem-triggered (push sent, server job)Nothing; deliberately excluded from activity so it can’t inflate DAU

Two assignments matter most: your registration event should carry Registration, and your purchase event should carry Payment (it anchors revenue). A user is registered on the first day any user-activity event sees them, with or without a registration event; tagging the real one makes its timestamp and properties the ones recorded, and the cohort and retention packs build on it. See How a user is registered.

Generate

Select “Generate”. Asemic scaffolds the events plus starter properties and metrics into your draft. Nothing is live yet; the next cards offer metric packs to build out the model, and it all ships when you publish.

Refine an event

Generation gets the shape right; individual events can be refined afterwards. Select an event on the Data Model page to open its editor:

  • “Display name”: what the event is called in the UI and in AI answers. The event id stays the reference that formulas use, so changing the display name breaks nothing.
  • “Where (optional)”: a row filter, in warehouse SQL, that decides which rows are this event. For a one-big-table source it holds the event-type filter the wizard wrote; on any source it can narrow the rows, for example to exclude internal test accounts. The field autocompletes over this event’s own columns. Type { to reference a column by its id, which matters for nested fields: {device_category} resolves to device.category.
  • Roles and Key columns (User id, Timestamp, Date) can be changed here as well.
  • The columns grid sets each column’s display name, type, and tags, and is where computed and hidden columns are defined; see Event columns.

The row filter applies everywhere the event’s rows are read: activity, registrations, properties, and charts. A row it excludes does not make a user active and does not register them, so a filter that removes test accounts removes them from DAU and cohorts too. Like every model change, an edit takes effect when you publish; days already computed keep their old values until they are backfilled again.