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

fix/datespine-empty #119

Merged
merged 6 commits into from
Apr 3, 2024
Merged

fix/datespine-empty #119

merged 6 commits into from
Apr 3, 2024

Conversation

fivetran-joemarkiewicz
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz commented Mar 22, 2024

PR Overview

This PR will address the following Issue/Feature: Issue #118

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

This is simply adding default start and end dates to the int_quickbooks__general_ledger_date_spine model. This will not result in breaking changes. Instead it will ensure users who do not yet have transactions are able to see success in the end models.

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

Bug Fixes

  • Included a default start and end date in the int_quickbooks__general_ledger_date_spine logic when generating the date spine. These default start and end dates will ensure the model still succeeds when no transactions are yet available.
    • The default start date will be one month in the past
    • The default end date will be the current date

Under the Hood

  • Updated the maintainer PR template to resemble the most up to date format.
  • Removed the check docs GitHub Action as it is no longer necessary.

PR Checklist

Basic Validation

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

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

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

  • 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:

To validate these changes, I first attempted to run the QuickBooks data model on a schema where no transactions were present (I did this by just choosing a non existent schema to run the package against) and installed the production version of the data model. After doing this, I was able to see the run failed with the same error highlighted in the issue.

image

I then wanted to confirm that when using the same non existent schema (to emulate a schema with no transactions) that the data model would succeed given the changes in this PR. I was able to validate that these changes do in fact result in the expected outcome.

image

Further, I can confirm that this causes no issues on schemas that do have transactions present in the source schema. See in the screenshot below how prod and dev both have the same min and max dates in the general ledger date spine before/after this update is applied. Therefore, existing users will not experience any changes and this will simply address the issue when customers do not have transactions present.

image

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 March 26, 2024 20:44
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! should we make a quickbooks version of this exploratory issue as well? fivetran/dbt_salesforce#49

@fivetran-joemarkiewicz
Copy link
Contributor Author

lgtm! should we make a quickbooks version of this exploratory issue as well? fivetran/dbt_salesforce#49

That is great callout. Maybe we just consolidate QuickBooks in the FR you referenced for Salesforce. I believe when we get around to that FR we can explore the suggestion with all other datespine models in mind. As it will probably be relevant for all others as well.

@fivetran-joemarkiewicz
Copy link
Contributor Author

Following the recent casting changes, I can confirm the results are still what we would expect.

  • No changes between dev (the changes from this PR) and prod (live version of the package) when looking at the min and max dates.
  • Prod with no transactions doesn't exist because it failed as the original issue details
  • Dev with no transactions succeeds due to the changes in this PR but have no data as expected.

image

@fivetran-joemarkiewicz fivetran-joemarkiewicz merged commit 505a2f4 into main Apr 3, 2024
8 checks passed
@fivetran-joemarkiewicz fivetran-joemarkiewicz deleted the fix/datespine-empty branch April 3, 2024 16:04
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.

None yet

2 participants