Skip to content

Explore more predictable solutions for previous_* field values #39

@fivetran-jamie

Description

@fivetran-jamie

In pendo__page_event and pendo__feature_event, we have the following kind of logic for grabbing previous page/feature event values:

lag(<field>) over(partition by visitor_id order by occurred_at asc, _fivetran_synced asc) as previous_<field>

However, events will often have identical occurred_at and _fivetran_synced timestamps, so SQL arbitrarily chooses the previous event.

Let's explore other solutions to produce consistent outputs -- perhaps there have been new fields added since we first made these models that we can leverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions