Skip to main content

Define attribute groups

Define the behavior you want to capture in attribute groups. Choose whether to calculate attributes from your event stream or sync pre-calculated values from your warehouse.

To create an attribute group, go to Signals > Attribute groups in Snowplow Console and follow the instructions.

Create attribute group form with name, description, data source, and owner fields

The first step is to specify:

  • A unique name
  • An optional description
  • The email address of the primary owner or maintainer
  • Which data source you want to use

Define the attribute group

An attribute group definition has several parts, described in this section. The most important choice is the data source, which determines how attributes are calculated and which options are available.

Data source

There are two sources to choose from:

  • Stream: real-time Snowplow event stream, with an optional warehouse backfill
  • Warehouse: pre-calculated values in a warehouse table that you sync to the Profiles Store

Attribute groups are configured differently based on the data source.

Stream

Signals calculates attributes from events in your real-time stream. Check out the quick start tutorial for a step-by-step guide.

You'll need to define the attributes you want to calculate from your event stream.

Backfill attributes

Stream attribute groups only calculate attributes from the moment they are published. If you want to include historical data, enable backfill when creating the group.

Warehouse connection

A warehouse connection is required to use the backfill option. Only Snowflake and BigQuery are supported currently.

Enable Backfill attributes when creating the group. A date picker appears — select the date from which Signals should backfill attribute values from your Snowplow atomic events table. On publish, Signals backfills all events from that date up to the publish timestamp using your warehouse.

Backfill operates within a defined period: from your selected start date to the publish timestamp. This can take some time depending on data volume. The streaming engine starts immediately on publish and processes all new events in real time. Once backfill completes its defined period, only the streaming engine is active. You can monitor progress with the status bar in Snowplow Console.

Stream attribute group with Backfill attributes toggle enabled and date picker shown

Warehouse

Attribute groups with a warehouse source don't require attribute definition, as no calculation is performed. This source type syncs existing, pre-calculated warehouse values to your Profiles Store using the batch engine.

See Warehouse configuration for full configuration details.

Provide the warehouse and table details, and select which fields you want to send to Signals.

Warehouse source configuration showing warehouse table and field mapping options

Attribute group options

Configure the attribute group fields described at the top of this page. Additional options such as backfill and TTL are covered in the sections below.

Attribute keys

All attribute groups need an attribute key. See Attribute keys for details on using built-in keys and creating custom ones.

Attribute lifetimes

TTL (time-to-live) configuration applies to attributes without a period. For attributes with a period, the TTL is set automatically to match the period and any configured TTL is ignored.

We recommend setting a TTL on your attribute group to avoid stale values persisting in your Profiles Store indefinitely. The defaults are 7 days for stream attribute groups and 365 days for warehouse attribute groups. If no TTL is set on the attribute group, the attribute key's TTL is used; if neither is set, the defaults apply.

When an attribute has not been updated for its defined TTL, its value is deleted: fetching it will return a None value. If Signals then processes a new event that updates the attribute, or syncs new data from the warehouse, the expiration timer is reset.

Configure a TTL when creating or updating the attribute group.

Attribute group TTL configuration field

Test attribute definitions

After defining one or more attributes for stream attribute groups, you can test the configuration before publishing. This outputs a table of attributes calculated from your atomic events table, using a random subset of events from the last hour.

Warehouse connection

A warehouse connection is required to test attribute definitions.

Click the Run preview button in the bottom right corner.

Run preview button in the bottom right corner of the attribute group editor

Publish attribute groups

Click Create attribute group to save it as a draft.

Draft attribute group page showing Edit and Publish buttons

Click Edit to make changes. To send the configuration to your Signals infrastructure, click Publish. This allows Signals to start calculating attributes or syncing tables, and populating the Profiles Store.

Published attribute group page showing active status and management options

Once published, Signals starts calculating attribute values and storing them in the Profiles Store. To use them, retrieve the attributes in your application, typically via a service.

Versioning

Attribute groups are versioned, which allows you to iterate on definitions without breaking downstream processes. You'll select specific attribute group versions when you define services.

All attribute groups start as v1. If you make changes to the definition, the version is automatically incremented when you edit and republish.

Delete an attribute group

To unpublish or delete an attribute group, click the button on the group details page.

Attribute group management menu showing Edit, Unpublish, and Delete options

Unpublishing is version specific. It stops Signals from calculating attributes for that version, but existing attribute values remain in your Profiles Store. You can republish it later if needed.

Choose Delete to permanently delete all versions of the attribute group, along with attribute values in your Profiles Store for this group.

If the attribute group version is used by a service, you'll need to update the service definition before unpublishing or deleting.

If the attribute group version is used by a published intervention, deleting or unpublishing it will unpublish the intervention.