Skip to content

feature/union-data#71

Merged
fivetran-catfritz merged 28 commits into
mainfrom
feature/union-data
Oct 27, 2025
Merged

feature/union-data#71
fivetran-catfritz merged 28 commits into
mainfrom
feature/union-data

Conversation

@fivetran-catfritz
Copy link
Copy Markdown
Contributor

@fivetran-catfritz fivetran-catfritz commented Oct 16, 2025

PR Overview

Package version introduced in this PR:

  • v1.1.0

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

  • GA-1007455

Summary of changes:

  • Adds union data support

Submission Checklist

  • Added macros
  • tmp:
    • Add *.*_union_connections macro call
  • Staging:
    • Add {{ *.apply_source_relation() }}
    • Add source_relation to final select list
    • Add enabled: "{{ var('github_sources', []) == [] }}" to src.yml
  • Intermediate and Final:
    • Add source_relation column to:
      • models
      • joins
      • window functions
      • surrogate keys
    • Review subqueries, cross joins, and otherwise complex joins
  • dbt_project.yml:
    • add <package_name>_sources: [] to vars
  • Documentation:
    • stg_*.yml
    • final .yml
    • remove uniqueness tests in models where source_relation was added
  • README:
    • Add union data instructions

Changelog

  • Draft changelog for PR
  • Final changelog for release review

@fivetran-catfritz fivetran-catfritz self-assigned this Oct 16, 2025
@fivetran-catfritz fivetran-catfritz added the docs:ready Triggers the docs generator workflow. label Oct 17, 2025
Copy link
Copy Markdown
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.

Still testing but wanted to get this stuff back to you

Comment thread README.md
Comment thread README.md Outdated
Comment thread models/github.yml
Comment thread models/github.yml
@@ -0,0 +1,76 @@
{% macro github_union_connections(connection_dictionary, single_source_name, single_table_name, default_identifier) %}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we remove the default_identifier argument? It was necessary for Netsuite since the Netsuite1 vs Netsuite2 names are slightly different (which is why the table names != the source table names), but here the single_table_name and default_identifier are always the same

I don't think it's necessary for the other packages we plan to roll union_data out to as well (I think)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

From standup, we decided to use default_identifier=single_table_name so we can keep this and for another package to use if necessary. We'll store macros like this in a central area but just for reference and not as a package.

Comment thread macros/union/github_union_connections.sql
Comment thread macros/union/github_union_connections.sql
Copy link
Copy Markdown
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.

Looking good but some requested changes!

Comment thread README.md
Comment thread README.md Outdated
Comment thread models/github.yml
Comment thread README.md
Comment thread macros/union/github_union_connections.sql Outdated
Comment thread macros/union/apply_source_relation.sql Outdated
fivetran-catfritz and others added 5 commits October 22, 2025 16:01
Co-authored-by: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com>
Copy link
Copy Markdown
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.

Very close! Most little doc suggestions + one required change in the src file

Comment thread README.md Outdated
loader: Fivetran
config:
loaded_at_field: _fivetran_synced
enabled: "{{ var('github_sources', []) == [] }}"
Copy link
Copy Markdown
Contributor

@fivetran-jamie fivetran-jamie Oct 23, 2025

Choose a reason for hiding this comment

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

We also need to include this in the table-level enabled configs that include variables, like on line 22 for issue_assignee

        config:
          loaded_at_field: _fivetran_synced
          enabled: "{{ var('github__using_issue_assignee', true) and var('github_sources', []) == [] }}"

Otherwise the enabled config gets overwritten and some github source tables are included in the DAG
image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

Comment thread README.md Outdated
Comment thread README.md
fivetran-catfritz and others added 2 commits October 23, 2025 15:40
Co-authored-by: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com>
@fivetran-catfritz fivetran-catfritz added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Oct 27, 2025
@fivetran-catfritz fivetran-catfritz merged commit 48ceaa5 into main Oct 27, 2025
8 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