Skip to content

Conversation

fivetran-avinash
Copy link
Contributor

@fivetran-avinash fivetran-avinash commented Feb 1, 2025

PR Overview

This PR will address the following Issue/Feature: Internal ticket

This PR will result in the following new package version: v0.4.0

Bringing back in a new field.

Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:

Breaking Changes (--full-refresh required)

  • Reintroduced _fivetran_deleted from the gl_detail source table, as the field was not fully deprecated within in the connector.
    It is null in normal incremental syncs, but can populate true in historical resyncs.
  • This ensures the general ledger models in the downstream dbt_sage_intacct transform package excludes deleted records from stg_sage_intacct__gl_detail.
  • Renamed _fivetran_deleted to:
    • is_batch_deleted in stg_sage_intacct__gl_batch
    • is_detail_deleted in stg_sage_intacct__gl_detail
    • This ensures column name uniqueness when they are joined into int_sage_intacct__active_gl_detail in the dbt_sage_intacct package.

Under the Hood

  • Updated gl_detail yml and seed files with _fivetran_deleted documentation and records for testing.

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt run –full-refresh && dbt test
  • [NA] dbt run (if incremental models are present) && dbt test

Before marking this PR as "ready for review" the following have been applied:

  • [NA] The appropriate issue has been linked, tagged, and properly assigned
  • All necessary documentation and version upgrades have been applied
  • docs were regenerated (unless this PR does not include any code or yml updates)
  • BuildKite integration tests are passing
  • Detailed validation steps have been provided below

Detailed Validation

Please share any and all of your validation steps:

See transform package

If you had to summarize this PR in an emoji, which would it be?

🧪

@fivetran-avinash fivetran-avinash self-assigned this Feb 4, 2025
@fivetran-avinash fivetran-avinash marked this pull request as ready for review February 4, 2025 11:05
fivetran-avinash and others added 2 commits February 4, 2025 03:50
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
CHANGELOG.md Outdated

## Breaking Changes (`--full-refresh` required)
- Reintroduced `_fivetran_deleted` from the `gl_detail` source table, as the field was not fully deprecated within in the connector.
It is null in normal incremental syncs, but can populate true in historical resyncs.
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
It is null in normal incremental syncs, but can populate true in historical resyncs.
**It is null in normal incremental syncs, but can populate true (or false) in historical resyncs.**

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
## Breaking Changes (`--full-refresh` required)
- Reintroduced `_fivetran_deleted` from the `gl_detail` source table, as the field was not fully deprecated within in the connector.
It is null in normal incremental syncs, but can populate true in historical resyncs.
- This ensures the general ledger models in the downstream `dbt_sage_intacct` transform package excludes deleted records from `stg_sage_intacct__gl_detail`.
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
- This ensures the general ledger models in the downstream `dbt_sage_intacct` transform package excludes deleted records from `stg_sage_intacct__gl_detail`.
- This ensures the general ledger models in the downstream `dbt_sage_intacct` transform package exclude deleted records from `stg_sage_intacct__gl_detail`.

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.

@@ -413,6 +413,10 @@ models:
description: When transaction is modified
- name: paid_at
description: When transaction was paid
- name: _fivetran_deleted
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
- name: _fivetran_deleted
- name: is_detail_deleted

We should also update the analogous is_batch_deleted column in the staging gl_batch model

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.

Comment on lines 417 to 419
description: The timestamp of when the data was deleted by Fivetran. Although the `_fivetran_deleted` column is no
longer being actively synced in incremental runs in the connector in `gl_detail`,
it can populate with `true/false` values in historical resyncs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Something more like this

Suggested change
description: The timestamp of when the data was deleted by Fivetran. Although the `_fivetran_deleted` column is no
longer being actively synced in incremental runs in the connector in `gl_detail`,
it can populate with `true/false` values in historical resyncs.
description: Boolean field indicating whether the record was deleted. Due to source limitations, this field is currently populated with `nulls` in incremental syncs in Fivetran. In historical resyncs, it may be populated with `true` or `false`.

Copy link
Contributor

@fivetran-jamie fivetran-jamie Feb 5, 2025

Choose a reason for hiding this comment

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

Can you apply the same update to the description of stg_sage_intacct__gl_batch._fivetran_deleted (which should be renamed to is_batch_deleted there)

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh could you also update the descriptions in the source yml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't this behavior just for gl_detail? or was it for other models like gl_batch as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Confirmed. Did update the _fivetran_deleted descriptions to reference them as booleans rather than timestamps.

CHANGELOG.md Outdated
# dbt_sage_intacct_source v0.4.0
[PR #20](https://github.com/fivetran/dbt_sage_intacct_source/pull/20) includes the following updates:

## Breaking Changes (`--full-refresh` required)
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
## Breaking Changes (`--full-refresh` required)
## Breaking Changes

The package doesn't actually have any incremental models

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.

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!

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

Copy link
Contributor

@fivetran-catfritz fivetran-catfritz left a comment

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 merged commit e34b93e into main Feb 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants