From 438c47ad01e4202f5eccea13f75cbc6791b44f5b Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:48:00 -0800 Subject: [PATCH 1/3] fix grain of user audit activity model --- CHANGELOG.md | 7 +++++++ models/fivetran_platform.yml | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb066508..7a4f1434 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# dbt_fivetran_log v1.3.1 + +## Bug Fixes +- Adjusts the uniqueness test on the recently introduced `fivetran_platform__audit_user_activity` model. + - Previously, the `log_id` was erroneously considered the primary key of this model. + - Now, the model tests for unique combinations of `log_id` and `occurred_at`. + # dbt_fivetran_log v1.3.0 ## 🚨 Breaking Changes 🚨 diff --git a/models/fivetran_platform.yml b/models/fivetran_platform.yml index 8f54474c..11ff749d 100644 --- a/models/fivetran_platform.yml +++ b/models/fivetran_platform.yml @@ -287,6 +287,11 @@ models: Each record represents a user-triggered action in your Fivetran instance.This model is intended for audit-trail purposes, as it can be very helpful when trying to trace a user action to a [log event](https://fivetran.com/docs/logs#logeventlist) such as a schema change, sync frequency update, manual update, broken connection, etc. + tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - log_id + - occurred_at columns: - name: date_day description: Date on which the user action occurred. @@ -323,7 +328,4 @@ models: - name: message_data description: The details of the event in JSON format. - name: log_id - description: Unique ID of the log record. - tests: - - unique - - not_null \ No newline at end of file + description: Unique ID of the log record. \ No newline at end of file From c809ead2fc3ce1b3058dff6b8f6fcdffccf555c6 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Tue, 5 Dec 2023 11:11:51 -0800 Subject: [PATCH 2/3] changelog with pr link --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a4f1434..7689052c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # dbt_fivetran_log v1.3.1 ## Bug Fixes +[PR #102](https://github.com/fivetran/dbt_fivetran_log/pull/102) applies the following update: - Adjusts the uniqueness test on the recently introduced `fivetran_platform__audit_user_activity` model. - Previously, the `log_id` was erroneously considered the primary key of this model. - Now, the model tests for unique combinations of `log_id` and `occurred_at`. From 8ad1cfb31603936308dfef6b1b1dfbc537d0ddc4 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Thu, 7 Dec 2023 10:44:57 -0800 Subject: [PATCH 3/3] Update CHANGELOG.md Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com> --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7689052c..c58f3bc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,8 @@ ## Bug Fixes [PR #102](https://github.com/fivetran/dbt_fivetran_log/pull/102) applies the following update: -- Adjusts the uniqueness test on the recently introduced `fivetran_platform__audit_user_activity` model. +- Adjusts the uniqueness test on the recently introduced `fivetran_platform__audit_user_activity` model to test on `log_id` and `occurred_at`. - Previously, the `log_id` was erroneously considered the primary key of this model. - - Now, the model tests for unique combinations of `log_id` and `occurred_at`. # dbt_fivetran_log v1.3.0