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

Format all models for consistency #390

Merged
merged 10 commits into from
Aug 30, 2024
Prev Previous commit
Next Next commit
SQL Fluff changes
- Removed L02 from tox.ini
- Formatted dim_dbt__current_models
poloaraujo committed Oct 4, 2023
commit bf46483302f3d069f799aef17e5f88913dc2f64c
9 changes: 6 additions & 3 deletions models/dim_dbt__current_models.sql
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
with
base as (

select *
select
*
from {{ ref('stg_dbt__models') }}

)

, model_executions as (

select *
select
*
from {{ ref('stg_dbt__model_executions') }}

)

, latest_models as (

/* Retrieves the models present in the most recent run */
select *
select
*
from base
where run_started_at = (select max(run_started_at) from base)

3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ envlist = lint_all
[sqlfluff]
dialect = snowflake
templater = dbt
rules = LT01,LT02,LT03,CP01,AL01,AL02,CP02,ST08,LT06,LT07,AM01,LT08,AL05,RF02,RF03,CP03,ST01,LT09,AM03,CP04,LT10,ST05,ST03,JJ01,AM05,CV08
rules = LT01,LT03,CP01,AL01,AL02,CP02,ST08,LT06,LT07,AM01,LT08,AL05,RF02,RF03,CP03,ST01,LT09,AM03,CP04,LT10,ST05,ST03,JJ01,AM05,CV08

# LT01: [aliasing.table] Implicit/explicit aliasing of table.
# AL02: [aliasing.column] Implicit/explicit aliasing of columns.
@@ -20,7 +20,6 @@ rules = LT01,LT02,LT03,CP01,AL01,AL02,CP02,ST08,LT06,LT07,AM01,LT08,AL05,RF02,RF
# CV08: [convention.left_join] Use 'LEFT JOIN' instead of 'RIGHT JOIN'.
# JJ01: [jinja.padding] Jinja tags should have a single whitespace on either side.
# LT01: [layout.spacing] Inappropriate Spacing.
# LT02: [layout.indent] Incorrect Indentation.
# LT03: [layout.operators] Operators should follow a standard for being before/after newlines.
# LT06: [layout.functions] Function name not immediately followed by parenthesis.
# LT07: [layout.functions] 'WITH' clause closing bracket should be on a new line.