Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix/schema-name #87

Merged
merged 3 commits into from
Aug 29, 2023
Merged

bugfix/schema-name #87

merged 3 commits into from
Aug 29, 2023

Conversation

fivetran-joemarkiewicz
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz commented Aug 24, 2023

PR Overview

This PR will address the following Issue/Feature: No linked issue in GitHub. This relates to the Height ticket T-521886

This PR will result in the following new package version: v1.1.0

Since this is adding a new field schema_name to the fivetran_platform__audit_table model which is an incremental one, this will result in a breaking change and require users to run a --full-refresh when upgrading.

Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:

🚨 Feature Updates (Breaking Change) 🚨
The below change was made to an incremental model. As such, a dbt run --full-refresh will be required following an upgrade to capture the new column.

  • Added schema_name to the fivetran_platform__audit_table end model. This schema name field is captured from the message_data JSON within the log source table. In cases where the schema_name is not provided a coalesce was added to replicate the connector_name as the `schema_name.

Documentation Updates

  • Fixed links in the README models section to properly redirect to the dbt hosted docs for the relevant models.

PR Checklist

Basic Validation

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

  • dbt compile
  • dbt run –full-refresh
  • dbt run
  • dbt test
  • [n/a] dbt run –vars (if applicable) no vars were tested in the development of this update

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

  • The appropriate issue has been linked and tagged
  • You are assigned to the corresponding issue and this PR
  • BuildKite integration tests are passing

Detailed Validation

Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

  • You have validated these changes and assure this PR will address the respective Issue/Feature.
  • You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
  • You have provided details below around the validation steps performed to gain confidence in these changes.

In order to validate these changes I wanted to make sure there were no changes to the row count which would validate that the addition of the new schema made no changes to the underlying source. However, when validating this I actually noticed that the changes I had made in my branch was larger than the current live version of the platform package 🤔

image

When investigating this further I found there were only a few occurrences where additional records occurred. I was able to isolate the differences to three table_name records: fivetran_audit, user, ticket.

image

When taking a deeper look I was able to see that these three tables actually existed in multiple schemas. For example, the user table exists in both the snowflake_stage_jira and the snowflake_stage_zendesk schemas. The same goes for the ticket table with Zendesk and HubSpot schemas.

image

When looking at the current version I was able to see that it looks like this difference is not fully captured and the row insert or replace sums are being incorrectly aggregated all together.

image

To further validate, I was able to prove that the Fivetran UI for these tables in fact matches what we see in the updates within this branch. For proof of this validation, please investigate the Usage tab for the snowflake_stage connector and see for these specific tables the totals in the audit_table match what we see in the UI.

Standard Updates

Please acknowledge that your PR contains the following standard updates:

  • Package versioning has been appropriately indexed in the following locations:
    • indexed within dbt_project.yml
    • indexed within integration_tests/dbt_project.yml
  • CHANGELOG has individual entries for each respective change in this PR
  • README updates have been applied (if applicable)
  • [n/a] DECISIONLOG updates have been updated (if applicable)
  • Appropriate yml documentation has been added (if applicable)

dbt Docs

Please acknowledge that after the above were all completed the below were applied to your branch:

  • docs were regenerated (unless this PR does not include any code or yml updates)

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

🌴

@fivetran-joemarkiewicz fivetran-joemarkiewicz marked this pull request as ready for review August 24, 2023 21:41
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.

looks great to me! just have a couple of doc suggestions that i can implement while you're out @fivetran-joemarkiewicz

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@fivetran-jamie fivetran-jamie merged commit 526c2d9 into main Aug 29, 2023
@fivetran-jamie fivetran-jamie deleted the bugfix/schema-name branch November 14, 2023 20:42
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.

2 participants