Skip to content

Group daily events by mapped event subtype so schema changes are summed - #205

Open
porkedchop wants to merge 1 commit into
fivetran:mainfrom
porkedchop:fix/daily-events-schema-change-grouping
Open

porkedchop wants to merge 1 commit into
fivetran:mainfrom
porkedchop:fix/daily-events-schema-change-grouping

Conversation

@porkedchop

Copy link
Copy Markdown

Resolves #204

Please provide your name and company

Bishop Kammeraad

Describe what this PR changes and how it addresses the linked issue or feature request.

Changes the group by in the agg_log_events CTE of fivetran_platform__connection_daily_events from event_subtype to the case expression that maps schema change subtypes to schema_change. This restores the grouping that group by 1,2,3 had before PR #101, so all schema change events for a connection and day are summed into one row before the pivot.

How did you validate the changes introduced within this PR, and what warehouse did you use for testing?

DuckDB with the integration test data, plus three schema change rows added to a local copy of the log seed (two create_table, one alter_table, same connection and day; not included in this PR). count_schema_changes for that day goes from 2 to 3. Other counts are unchanged. dbt build passes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] count_schema_changes takes the max subtype count instead of the total

1 participant