Skip to content

feature/log-lookback-window#182

Draft
fivetran-joemarkiewicz wants to merge 4 commits intomainfrom
feature/log-lookback-window
Draft

feature/log-lookback-window#182
fivetran-joemarkiewicz wants to merge 4 commits intomainfrom
feature/log-lookback-window

Conversation

@fivetran-joemarkiewicz
Copy link
Copy Markdown
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz commented Mar 19, 2026

PR Overview

Package version introduced in this PR:

  • v2.5.2 (testing as a pre-release first via 2.5.2-a1)

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

  • N/A

Summary of changes:

  • Reduces the amount of LOG data included in downstream end models to improve runtime.

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-joemarkiewicz fivetran-joemarkiewicz added the docs:ready Triggers the docs generator workflow. label Mar 19, 2026
Copy link
Copy Markdown
Contributor

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

A thought and a suggestion. Approved for pre-release.

from {{ var('log') }} No newline at end of file
from {{ var('log') }}
{% if var('fivetran_platform_lookback_window_months', none) is not none %}
where time_stamp >= cast({{ dbt.dateadd('month', -var('fivetran_platform_lookback_window_months', none), dbt.current_timestamp()) }} as {{ dbt.type_timestamp() }})
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 think this cast is redundant? dbt.dateadd is timestamp compatible.

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.

Since time_stamp is a timestamp datatype and dbt.dateadd returns a datetime datatype I need to cast as timestamp in order to ensure the where clause succeeds.

Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
Co-authored-by: Avinash Kunnath <108772760+fivetran-avinash@users.noreply.github.com>
@fivetran-joemarkiewicz fivetran-joemarkiewicz added the pre-release Triggers the auto-releaser workflow. label Mar 19, 2026
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. pre-release Triggers the auto-releaser workflow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants