Skip to content

Commit

Permalink
SQL Fluff changes
Browse files Browse the repository at this point in the history
- Removed L02 from tox.ini
- Formatted dim_dbt__current_models
  • Loading branch information
poloaraujo committed Oct 4, 2023
1 parent 0374a31 commit bf46483
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
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)

Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit bf46483

Please sign in to comment.