Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# dbt_intercom v1.6.1

[PR #82](https://github.com/fivetran/dbt_intercom/pull/82) includes the following updates:

## Bug Fix
- Updates the following staging models to filter records using `coalesce(_fivetran_active, true)`, ensuring that end models reflect only current records for customers using [Fivetran History Mode](https://fivetran.com/docs/using-fivetran/features/history-mode). The `coalesce` fallback preserves existing behavior for sources where the `_fivetran_active` column is not present.
- `stg_intercom__contact_history`
- `stg_intercom__conversation_history`
- `stg_intercom__contact_company_history`
- `stg_intercom__contact_tag_history`
- `stg_intercom__conversation_contact_history`
- `stg_intercom__conversation_tag_history`
- Applies the same `coalesce(_fivetran_active, true)` filter to `stg_intercom__conversation_part_history` within `int_intercom__conversation_part_aggregates`.

## Under the Hood
- Updates `integrity_conversation_enhanced` integration test to reflect the corrected row count behavior after the `_fivetran_active` filter changes.
- Removes `coalesce(_fivetran_active, true)` filter from `intercom__contact_enhaced` and `intercom__conversation_enhanced` models as filter has been moved to the staging layer.


# dbt_intercom v1.6.0

[PR #78](https://github.com/fivetran/dbt_intercom/pull/78) includes the following updates:
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config-version: 2
name: 'intercom'
version: '1.6.0'
version: '1.6.1'
require-dbt-version: [">=1.3.0", "<3.0.0"]
models:
intercom:
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'intercom_integration_tests'
version: '1.6.0'
version: '1.6.1'
profile: 'integration_tests'
config-version: 2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ with conversation_source_count as (

select count(distinct conversation_id) as stg_count
from {{ target.schema }}_intercom_dev.stg_intercom__conversation_history
where coalesce(_fivetran_active, true)
),

conversation_end_count as (
Expand Down
1 change: 0 additions & 1 deletion models/intercom__contact_enhanced.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
with contact_latest as (
select *
from {{ ref('stg_intercom__contact_history') }}
where coalesce(_fivetran_active, true)
),

--If you use the contact company table this will be included, if not it will be ignored.
Expand Down
1 change: 0 additions & 1 deletion models/intercom__conversation_enhanced.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
with latest_conversation as (
select *
from {{ ref('stg_intercom__conversation_history') }}
where coalesce(_fivetran_active, true)
),

conversation_string_aggregates as (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ with latest_conversation_part as (
latest_conversation as (
select *
from {{ ref('stg_intercom__conversation_history') }}
where coalesce(_fivetran_active, true)
),

--Aggregates conversation part data related to a single conversation from the int_intercom__latest_conversation model. See below for specific aggregates.
Expand Down
1 change: 1 addition & 0 deletions models/staging/stg_intercom__contact_company_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ final as (

select *
from final
where coalesce(_fivetran_active, true)
1 change: 1 addition & 0 deletions models/staging/stg_intercom__contact_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ final as (

select *
from final
where coalesce(_fivetran_active, true)
1 change: 1 addition & 0 deletions models/staging/stg_intercom__contact_tag_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ final as (

select *
from final
where coalesce(_fivetran_active, true)
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ final as (

select *
from final
where coalesce(_fivetran_active, true)
3 changes: 2 additions & 1 deletion models/staging/stg_intercom__conversation_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ final as (
)

select *
from final
from final
where coalesce(_fivetran_active, true)
1 change: 1 addition & 0 deletions models/staging/stg_intercom__conversation_tag_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ final as (

select *
from final
where coalesce(_fivetran_active, true)
Loading