Skip to content

feat: convert dim_products to incremental#3

Open
anandgupta42 wants to merge 2 commits intomainfrom
sim/incremental-dim_products-202603241028
Open

feat: convert dim_products to incremental#3
anandgupta42 wants to merge 2 commits intomainfrom
sim/incremental-dim_products-202603241028

Conversation

@anandgupta42
Copy link
Copy Markdown
Contributor

Converted dim_products.sql to incremental materialization using merge strategy on revenue_date.

This is a simulated PR for testing altimate-code-actions.

@github-actions
Copy link
Copy Markdown

⚠️ Altimate Code — 3 warnings

Check Result Details
SQL Quality ⚠️ 3 warnings 3 issues in 1 files
⚠️ 3 warnings
# File Line Issue Fix
1 models/marts/dim_products.sql 11 SELECT * detected — explicitly list columns for clarity and performance Replace SELECT * with an explicit column list, e.g. SELECT id, name, status FROM ...
2 models/marts/dim_products.sql 56 SELECT * detected — explicitly list columns for clarity and performance Replace SELECT * with an explicit column list, e.g. SELECT id, name, status FROM ...
3 models/marts/dim_products.sql 59 Possible correlated subquery in WHERE clause — consider rewriting as a JOIN for better performance Rewrite the correlated subquery as a JOIN or use a CTE to materialize the subquery result

🔍 Altimate Code v0.3.0 · Configure · Feedback


with products as (

select * from {{ ref('stg_products') }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [select_star] SELECT * detected — explicitly list columns for clarity and performance

💡 Suggestion: Replace SELECT * with an explicit column list, e.g. SELECT id, name, status FROM ...

@@ -46,3 +54,7 @@ final as (
)

select * from final
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [select_star] SELECT * detected — explicitly list columns for clarity and performance

💡 Suggestion: Replace SELECT * with an explicit column list, e.g. SELECT id, name, status FROM ...

select * from final

{% if is_incremental() %}
where revenue_date > (select max(revenue_date) from {{ this }})
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [correlated_subquery] Possible correlated subquery in WHERE clause — consider rewriting as a JOIN for better performance

💡 Suggestion: Rewrite the correlated subquery as a JOIN or use a CTE to materialize the subquery result

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.

1 participant