Closed dgitis closed 8 months ago
Looks like the unique test can fail when there is a page with the same page location but different page titles (not uncommon for translated content)
This latest version removes page_path
and page_title
from the fct_ga4__pages
model which will help this model pass its uniqueness test.
Description & motivation
The addition of
page_engagement_key
which is built from thepage_referrer
where page_view events are concerned was causing multiple rows with the samepage_location
andevent_date_dt
in the first CTE.This PR adds a second aggregation in the second CTE to eliminate this redundancy and adds tests to the model to catch these issues in the future.
The
fct_ga4__pages
model will need a full refresh when upgrading to a version containing these changes as the new tests will trigger an error.Resolves #274
Checklist
dbt test
andpython -m pytest .
to validate existing tests