Learn about Schema Naming Conventions

Alec Moloney  
Edited

There's no one way to approach the naming of your Snowplow events and entities, however, we've documented a recommended approach below for customers curious about how we'd approach it ourselves.

 

Events & Entities

There's definitely different schools of though for naming, but we tend to go for snake_case in both schemas and properties of schemas as camelCase can sometimes get converted. We also find it can be a little less readable.

For entities aim to name for the singular noun of whatever the object is (e.g. user), and for events it's recommended to prioritise a verb or verb-noun sequence depending on what the event is for and how generic it is (e.g. play vs play_video).

 

Structured Events

When naming actions in our legacy event type, there are no validations on se_action other than length. Although it’s possible to set something like se_action as part of a page view event (or self describing event) you would have to override this manually - so in practice this is extremely rare.

In the stream if se_action is empty it’ll be an empty string ''rather than a null (as it’s a TSV representation so nulls aren’t explicitly defined).