Skip to content

bugfix/empty-table-spine - #53

Merged
fivetran-avinash merged 11 commits into
mainfrom
bugfix/empty-table-spine
Aug 11, 2026
Merged

fivetran-avinash merged 11 commits into
mainfrom
bugfix/empty-table-spine

Conversation

@fivetran-avinash

@fivetran-avinash fivetran-avinash commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

PR Overview

Package version introduced in this PR:

  • 1.3.1

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

  • GA-1034294

Summary of changes:

  • Handle date spine issue when there is no underlying data.

Submission Checklist

  • Alignment meeting with the reviewer (if needed)
    • Timeline and validation requirements discussed
  • Provide validation details:
    • Validation Steps: Check for unintentional effects (e.g., add/run consistency & integrity tests)
    • Testing Instructions: Confirm the change addresses the issue(s)
    • Focus Areas: Complex logic or queries that need extra attention
  • Merge any relevant open PRs into this PR

Changelog

  • Draft changelog for PR
  • Final changelog for release review

@fivetran-avinash fivetran-avinash self-assigned this Aug 8, 2026
@fivetran-avinash fivetran-avinash added the docs:ready Triggers the docs generator workflow. label Aug 8, 2026
{% endset %}

{%- set first_date = dbt_utils.get_single_value(first_date_query) %}
{%- set first_date = dbt_utils.get_single_value(first_date_query) or '2024-01-01' %}

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 works, but I would use the method you used in Recharge on line 13. For consistency and that way you're not bound to 2024.

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.

Ah good call.

Comment thread CHANGELOG.md Outdated
[PR #53](https://github.com/fivetran/dbt_apple_store/pull/53) includes the following updates:

## Bug Fix
- Fixes `int_apple_store__date_spine` compilation errors when the underlying sources are empty or contain no data. The model now falls back to a default start date of `2024-01-01` in this scenario.

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.

I suggest to synchronize the changelog message between Recharge and this PR.

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!

@fivetran-avinash fivetran-avinash left a comment

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.

@fivetran-catfritz ready for re-review!

Comment thread CHANGELOG.md Outdated
[PR #53](https://github.com/fivetran/dbt_apple_store/pull/53) includes the following updates:

## Bug Fix
- Fixes `int_apple_store__date_spine` compilation errors when the underlying sources are empty or contain no data. The model now falls back to a default start date of `2024-01-01` in this scenario.

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!

{% endset %}

{%- set first_date = dbt_utils.get_single_value(first_date_query) %}
{%- set first_date = dbt_utils.get_single_value(first_date_query) or '2024-01-01' %}

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.

Ah good call.

@fivetran-avinash fivetran-avinash added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Aug 10, 2026

@fivetran-catfritz fivetran-catfritz 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.

One additional adjustment but otherwise lgtm!

Comment thread models/intermediate/int_apple_store__date_spine.sql Outdated
Co-authored-by: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com>
@fivetran-avinash fivetran-avinash added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Aug 11, 2026
@fivetran-avinash
fivetran-avinash merged commit 4e8e3f1 into main Aug 11, 2026
9 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.

3 participants