Skip to content

Consolidate source + remove tests#67

Merged
fivetran-joemarkiewicz merged 25 commits into
mainfrom
MagicBot/consolidate-source-package
Aug 18, 2025
Merged

Consolidate source + remove tests#67
fivetran-joemarkiewicz merged 25 commits into
mainfrom
MagicBot/consolidate-source-package

Conversation

@fivetran-data-model-bot

@fivetran-data-model-bot fivetran-data-model-bot commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Summary

This PR is to combine the source and transform packages and remove tests not compatible with dbt Fusion 1.10.6+.

Please check the below automated updates were successful:

MANUAL UPDATES

  • If applicable, merge in the Q2 FY26 Automatic Package Updates PR.
  • If there are 2 docs.md files, consolidate the definitions the file in the main folder and remove the 2nd file.
  • Scan the README for non-standard references to the source package and remove or update.
  • Copy the passthrough vars or other non-standard vars from the source dbt_project.yml to the transform dbt_project.yml.
  • Check BK run logs for at least 2 warehouses
    • No further deprecation warnings
    • No union data "table not found" type warnings
  • Make sure below automatic updates were applied correctly.

Source + Transform Consolidation

  • Moved models/macros to models/staging/ and macros/staging/.
  • Updated all var('') references within models to use ref('stg_salesforce__').
  • Updated vars in dbt_project.yml from refs to sources.
  • Removed the source package from packages.yml.
  • Major version bump to v1.0.0 (or higher if applicable)

dbt Fusion Compatibility

  • Removed dbt_utils.unique_combination_of_columns test
  • Accepted values tests were removed where applicable (Shopify, NetSuite, QuickBooks).

YAML & Config Updates

  • Moved loaded_at_field under config: in src.yml, grouped with freshness
  • Added +schema and +materialization for the staging models in dbt_project.yml.

README

  • Removed references to the source package in:
    • Overview
    • Installation instructions
    • Dependencies list
    • Schema override examples

@fivetran-data-model-bot fivetran-data-model-bot added the next-release Include in the next release. label Aug 13, 2025
* Q2 FY26: Apply automated update.

* Q2 FY26: Update auto-release workflow only.

---------

Co-authored-by: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com>
Co-authored-by: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com>
@fivetran-jamie fivetran-jamie self-assigned this Aug 13, 2025
@fivetran-jamie fivetran-jamie added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Aug 14, 2025
@fivetran-jamie fivetran-jamie added the docs:ready Triggers the docs generator workflow. label Aug 14, 2025
@fivetran-jamie fivetran-jamie added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Aug 14, 2025
@fivetran-jamie fivetran-jamie added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Aug 14, 2025
@fivetran-catfritz fivetran-catfritz added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Aug 14, 2025
@fivetran-jamie fivetran-jamie added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Aug 14, 2025
@fivetran-joemarkiewicz fivetran-joemarkiewicz linked an issue Aug 14, 2025 that may be closed by this pull request
4 tasks

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

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.

@fivetran-jamie a few requests to update before approval

Comment thread CHANGELOG.md Outdated
Comment thread README.md Outdated
Comment thread dbt_project.yml
Comment on lines 7 to 9
+materialized: table
intermediate:
+materialized: ephemeral

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.

This config doesn't look right? There's no intermediate folder in this location.

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.

This may be a FR for us to explore more in the future

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.

Yeah I noticed that too and noted it to make a FR later. Also all of the models get written to the target schema - would we want to explore changing that later as well?

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.

@fivetran-joemarkiewicz should i create a FR here

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.

Yes, that would be great. I wouldn't want to change this just now, but we should in a future update.

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.

Created FR #68 for us to evaluate in a future update.

Comment thread dbt_project.yml
Comment thread dbt_project.yml Outdated
Comment thread integration_tests/dbt_project.yml Outdated
- name: user
identifier: "{{ var('salesforce_user_identifier', 'user')}}"
config:
loaded_at_field: _fivetran_synced

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.

Is this meant to be here?

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.

@fivetran-joemarkiewicz We should remove this with the global config in place

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.

As these are redundant, we ended up removing in this release.

identifier: "{{ var('salesforce_account_history_identifier', 'account')}}"
description: Represents historical records of individual accounts, which are organizations or people involved with your business (such as customers, competitors, and partners).
config:
loaded_at_field: _fivetran_synced

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.

Is this meant to be here?

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.

see below comment

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.

As these are redundant, we ended up removing in this release.

identifier: "{{ var('salesforce_contact_history_identifier', 'contact')}}"
description: Represents the historical record of contacts, which are people associated with an account.
config:
loaded_at_field: _fivetran_synced

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.

Is this meant to be here?

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.

It was in the original source yml file, and it is valid according to dbt's docs
image

But I don't think it's necessary, definitely open to removing! I initially left it just to introduce as few changes as possible at the source/staging layer, but it is inconsistent with our other packages.

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.

@fivetran-joemarkiewicz I think we can remove these with the global config in place, all the history models have this config, so it's redundant now.

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.

Yeah let's remove them now that they're not necessary given the global config.

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.

As these are redundant, we ended up removing in this release.

identifier: "{{ var('salesforce_opportunity_history_identifier', 'opportunity')}}"
description: Represents historical records of opportunities, which are sales or pending deals.
config:
loaded_at_field: _fivetran_synced

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.

Is this meant to be here?

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.

see reply above

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.

As these are redundant, we ended up removing in this release.

Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

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.

LGTM

@fivetran-avinash fivetran-avinash left a comment

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.

@fivetran-joemarkiewicz A few comments and suggestions before approval.

- name: user
identifier: "{{ var('salesforce_user_identifier', 'user')}}"
config:
loaded_at_field: _fivetran_synced

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.

@fivetran-joemarkiewicz We should remove this with the global config in place

identifier: "{{ var('salesforce_contact_history_identifier', 'contact')}}"
description: Represents the historical record of contacts, which are people associated with an account.
config:
loaded_at_field: _fivetran_synced

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.

@fivetran-joemarkiewicz I think we can remove these with the global config in place, all the history models have this config, so it's redundant now.

Comment thread dbt_project.yml
Comment on lines 7 to 9
+materialized: table
intermediate:
+materialized: ephemeral

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.

@fivetran-joemarkiewicz should i create a FR here

Comment thread dbt_project.yml Outdated
Comment on lines +18 to +19
tmp:
+materialized: view

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.

There are no tmp models (or folder) in salesforce_history, should we remove this?

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.

Good call, removing as it's not used.

Comment thread dbt_project.yml Outdated

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 +materialized: table in line 8 since it's setting everything in Buildkite as a table by default; although everything appears to be a table right now, it could mess up any future configurations we set up in the base dbt_project.yml

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.

Yeah that's a good callout. Removed the config to avoid any confusion in future updates.

Comment thread dbt_project.yml Outdated
salesforce:
staging:
+materialized: table
tmp:

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.

There are no tmp models (or folder) in salesforce, should we remove this?

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.

Yes, removed this config as it's not being used.

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
fivetran-joemarkiewicz and others added 5 commits August 18, 2025 14:47
Co-authored-by: Avinash Kunnath <108772760+fivetran-avinash@users.noreply.github.com>
Co-authored-by: Avinash Kunnath <108772760+fivetran-avinash@users.noreply.github.com>
Co-authored-by: Avinash Kunnath <108772760+fivetran-avinash@users.noreply.github.com>
@fivetran-joemarkiewicz fivetran-joemarkiewicz removed the docs:ready Triggers the docs generator workflow. label Aug 18, 2025
@fivetran-joemarkiewicz fivetran-joemarkiewicz added the docs:ready Triggers the docs generator workflow. label Aug 18, 2025

@fivetran-avinash fivetran-avinash left a comment

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.

@fivetran-joemarkiewicz fivetran-joemarkiewicz merged commit 5a68ce8 into main Aug 18, 2025
9 checks passed
@fivetran-joemarkiewicz fivetran-joemarkiewicz deleted the MagicBot/consolidate-source-package branch August 18, 2025 23:14
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. next-release Include in the next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Documentation] Move badges below H1 heading

5 participants