Skip to content

Conversation

@fivetran-avinash
Copy link
Contributor

@fivetran-avinash fivetran-avinash commented Nov 4, 2025

PR Overview

Package version introduced in this PR:

  • 1.2.0

This PR addresses the following Issue/Feature(s):

  • Ticket GA-1007458

Summary of changes:

  • Adding union data for ERTC support.

Submission Checklist

  • Alignment meeting with the reviewer (if needed)
    • Timeline and validation requirements discussed
  • Provide validation details:
    • Validation Steps: Check for unintentional effects (e.g., add/run consistency & integrity tests)
    • Testing Instructions: Confirm the change addresses the issue(s)
    • Focus Areas: Complex logic or queries that need extra attention
  • Merge any relevant open PRs into this PR

Changelog

  • Draft changelog for PR
  • Final changelog for release review

@fivetran-avinash fivetran-avinash changed the title Union Data Claude.md implementation [Feature] Union Data Nov 5, 2025
@fivetran-avinash fivetran-avinash self-assigned this Nov 5, 2025
@fivetran-avinash fivetran-avinash marked this pull request as ready for review November 5, 2025 20:05
@fivetran-avinash fivetran-avinash added the docs:ready Triggers the docs generator workflow. label Nov 5, 2025
Copy link
Contributor

@fivetran-jamie fivetran-jamie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good! Some requested changes

CHANGELOG.md Outdated
## Feature Update
- **Union Data Functionality**: This release supports running the package on multiple Intercom source connections. See the [README](https://github.com/fivetran/dbt_intercom/tree/main?tab=readme-ov-file#step-3-define-database-and-schema-variables) for details on how to leverage this feature.

## Under the Hood
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Under the Hood
## Tests Update

Since these aren't really under the hood for customers (besides the consistency tests -- that part can live in an Under the Hood section)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

CHANGELOG.md Outdated
| Data Model(s) | Change type | Old | New | Notes |
| ------------- | ----------- | ----| --- | ----- |
| All models | New column | | `source_relation` | Identifies the source connection when using multiple Intercom connections |
| `stg_intercom__tag` | New Data Type | `name` categorized as timestamp | `name` categorized as string | Modifies name to its proper string format. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `stg_intercom__tag` | New Data Type | `name` categorized as timestamp | `name` categorized as string | Modifies name to its proper string format. |
| `stg_intercom__tag` | New data type | `name` categorized as timestamp | `name` categorized as string | Modifies name to its proper string format. |

Just to align with the casing from the previous row (alternatively can adjust line 8 to be New Column)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

enabled=(var('fivetran_validation_tests_enabled', false))
) }}

{% set exclude_cols = ['source_relation'] + var('consistency_test_exclude_metrics', []) %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% set exclude_cols = ['source_relation'] + var('consistency_test_exclude_metrics', []) %}
{% set exclude_cols = var('consistency_test_exclude_metrics', []) %}

Before merging, can you remove source_relation from the exclusion columns?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

enabled=(var('fivetran_validation_tests_enabled', false))
) }}

{% set exclude_cols = ['source_relation'] + var('consistency_test_exclude_metrics', []) %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% set exclude_cols = ['source_relation'] + var('consistency_test_exclude_metrics', []) %}
{% set exclude_cols = var('consistency_test_exclude_metrics', []) %}

Before merging, can you remove source_relation from the exclusion columns?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

enabled=(var('fivetran_validation_tests_enabled', false))
) }}

{% set exclude_cols = ['source_relation', 'all_company_tags'] + var('consistency_test_exclude_metrics', []) %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% set exclude_cols = ['source_relation', 'all_company_tags'] + var('consistency_test_exclude_metrics', []) %}
{% set exclude_cols = ['all_company_tags'] + var('consistency_test_exclude_metrics', []) %}

Same request to remove source_relation before merging

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed


left join team
on team.team_id = team_admin.team_id
and team.source_relation = admin_table.source_relation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and team.source_relation = admin_table.source_relation
and team.source_relation = team_admin.source_relation

Since we're joining team and team_admin here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


left join tags
on tags.tag_id = company_tags.tag_id
and tags.source_relation = company_history.source_relation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and tags.source_relation = company_history.source_relation
and tags.source_relation = company_tags.source_relation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


left join tags
on tags.tag_id = contact_tags.tag_id
and tags.source_relation = contact_latest.source_relation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and tags.source_relation = contact_latest.source_relation
and tags.source_relation = contact_tags.source_relation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


left join company_history
on company_history.company_id = contact_company_history.company_id
and company_history.source_relation = contact_latest.source_relation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and company_history.source_relation = contact_latest.source_relation
and company_history.source_relation = contact_company_history.source_relation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


left join tags
on tags.tag_id = conversation_tags.tag_id
and tags.source_relation = latest_conversation.source_relation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and tags.source_relation = latest_conversation.source_relation
and tags.source_relation = conversation_tags.source_relation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Contributor Author

@fivetran-avinash fivetran-avinash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-jamie Ready for re-review!

@fivetran-avinash fivetran-avinash removed the docs:ready Triggers the docs generator workflow. label Nov 7, 2025
Copy link
Contributor

@fivetran-jamie fivetran-jamie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- reminder to regen the docs after the last round of changes

CHANGELOG.md Outdated
[PR #70](https://github.com/fivetran/dbt_intercom/pull/70) introduces the following updates:

## Schema/Data Changes
**3 total change • 2 possible breaking changes**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**3 total change • 2 possible breaking changes**
**3 total changes • 2 possible breaking changes**

@fivetran-avinash fivetran-avinash added the docs:ready Triggers the docs generator workflow. label Nov 7, 2025
@fivetran-avinash fivetran-avinash added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Nov 7, 2025
@fivetran-avinash fivetran-avinash merged commit 6da861b into main Nov 7, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs:ready Triggers the docs generator workflow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants