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
203 changes: 108 additions & 95 deletions models/dim_dbt__current_models.sql
Original file line number Diff line number Diff line change
@@ -1,97 +1,110 @@
with base as (
select *
from {{ ref('stg_dbt__models') }}
),

model_executions as (
select *
from {{ ref('stg_dbt__model_executions') }}
),

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

latest_models_runs as (
/* Retreives all successful run information for the models present in the most
recent run and ranks them based on query completion time */
select
model_executions.node_id
, model_executions.was_full_refresh
, model_executions.query_completed_at
, model_executions.total_node_runtime
, model_executions.rows_affected
{% if target.type == 'bigquery' %}
, model_executions.bytes_processed
{% endif %}
/* Row number by refresh and node ID */
, row_number() over (
partition by latest_models.node_id, model_executions.was_full_refresh
order by model_executions.query_completed_at desc /* most recent ranked first */
) as run_idx
/* Row number by node ID */
, row_number() over (
partition by latest_models.node_id
order by model_executions.query_completed_at desc /* most recent ranked first */
) as run_idx_id_only
from model_executions
inner join latest_models on model_executions.node_id = latest_models.node_id
where model_executions.status = 'success'
),

latest_model_stats as (
select
node_id
, max(case when was_full_refresh then query_completed_at end) as last_full_refresh_run_completed_at
, max(case when was_full_refresh then total_node_runtime end) as last_full_refresh_run_total_runtime
, max(case when was_full_refresh then rows_affected end) as last_full_refresh_run_rows_affected
{% if target.type == 'bigquery' %}
, max(case when was_full_refresh then bytes_processed end) as last_full_refresh_run_bytes_processed
{% endif %}
, max(case when run_idx_id_only = 1 then query_completed_at end) as last_run_completed_at
, max(case when run_idx_id_only = 1 then total_node_runtime end) as last_run_total_runtime
, max(case when run_idx_id_only = 1 then rows_affected end) as last_run_rows_affected
{% if target.type == 'bigquery' %}
, max(case when run_idx_id_only = 1 then bytes_processed end) as last_run_bytes_processed
{% endif %}
, max(case when not was_full_refresh then query_completed_at end) as last_incremental_run_completed_at
, max(case when not was_full_refresh then total_node_runtime end) as last_incremental_run_total_runtime
, max(case when not was_full_refresh then rows_affected end) as last_incremental_run_rows_affected
{% if target.type == 'bigquery' %}
, max(case when not was_full_refresh then bytes_processed end) as last_incremental_run_bytes_processed
{% endif %}
from latest_models_runs
where run_idx = 1
group by 1
),

final as (
select
latest_models.*
, latest_model_stats.last_full_refresh_run_completed_at
, latest_model_stats.last_full_refresh_run_total_runtime
, latest_model_stats.last_full_refresh_run_rows_affected
{% if target.type == 'bigquery' %}
, latest_model_stats.last_full_refresh_run_bytes_processed
{% endif %}
, latest_model_stats.last_run_completed_at
, latest_model_stats.last_run_total_runtime
, latest_model_stats.last_run_rows_affected
{% if target.type == 'bigquery' %}
, latest_model_stats.last_run_bytes_processed
{% endif %}
, latest_model_stats.last_incremental_run_completed_at
, latest_model_stats.last_incremental_run_total_runtime
, latest_model_stats.last_incremental_run_rows_affected
{% if target.type == 'bigquery' %}
, latest_model_stats.last_incremental_run_bytes_processed
{% endif %}
from latest_models
left join latest_model_stats
on latest_models.node_id = latest_model_stats.node_id
)
with
base as (

Check failure on line 2 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select *

Check failure on line 4 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
from {{ ref('stg_dbt__models') }}

Check failure on line 5 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

)

Check failure on line 7 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

, model_executions as (

Check failure on line 9 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select *

Check failure on line 11 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
from {{ ref('stg_dbt__model_executions') }}

Check failure on line 12 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

)

Check failure on line 14 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

, latest_models as (

Check failure on line 16 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

/* Retrieves the models present in the most recent run */

Check failure on line 18 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
select *

Check failure on line 19 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
from base

Check failure on line 20 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
where run_started_at = (select max(run_started_at) from base)

Check failure on line 21 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

)

Check failure on line 23 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

, latest_models_runs as (

Check failure on line 25 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

/* Retreives all successful run information for the models present in the most

Check failure on line 27 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
recent run and ranks them based on query completion time */
select

Check failure on line 29 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
model_executions.node_id

Check failure on line 30 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, model_executions.was_full_refresh

Check failure on line 31 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, model_executions.query_completed_at

Check failure on line 32 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, model_executions.total_node_runtime

Check failure on line 33 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, model_executions.rows_affected

Check failure on line 34 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
{% if target.type == 'bigquery' %}

Check failure on line 35 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, model_executions.bytes_processed
{% endif %}
/* Row number by refresh and node ID */

Check failure on line 38 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, row_number() over (

Check failure on line 39 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
partition by latest_models.node_id, model_executions.was_full_refresh

Check failure on line 40 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 12 spaces.
order by model_executions.query_completed_at desc /* most recent ranked first */

Check failure on line 41 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 12 spaces.
) as run_idx

Check failure on line 42 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
/* Row number by node ID */

Check failure on line 43 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, row_number() over (

Check failure on line 44 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
partition by latest_models.node_id

Check failure on line 45 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 12 spaces.
order by model_executions.query_completed_at desc /* most recent ranked first */

Check failure on line 46 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 12 spaces.
) as run_idx_id_only

Check failure on line 47 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
from model_executions

Check failure on line 48 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
inner join latest_models on model_executions.node_id = latest_models.node_id

Check failure on line 49 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
where model_executions.status = 'success'

Check failure on line 50 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

)

Check failure on line 52 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

, latest_model_stats as (

Check failure on line 54 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select

Check failure on line 56 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
node_id

Check failure on line 57 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, max(case when was_full_refresh then query_completed_at end) as last_full_refresh_run_completed_at

Check failure on line 58 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, max(case when was_full_refresh then total_node_runtime end) as last_full_refresh_run_total_runtime

Check failure on line 59 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, max(case when was_full_refresh then rows_affected end) as last_full_refresh_run_rows_affected

Check failure on line 60 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
{% if target.type == 'bigquery' %}

Check failure on line 61 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, max(case when was_full_refresh then bytes_processed end) as last_full_refresh_run_bytes_processed
{% endif %}
, max(case when run_idx_id_only = 1 then query_completed_at end) as last_run_completed_at

Check failure on line 64 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, max(case when run_idx_id_only = 1 then total_node_runtime end) as last_run_total_runtime

Check failure on line 65 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, max(case when run_idx_id_only = 1 then rows_affected end) as last_run_rows_affected

Check failure on line 66 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
{% if target.type == 'bigquery' %}

Check failure on line 67 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, max(case when run_idx_id_only = 1 then bytes_processed end) as last_run_bytes_processed
{% endif %}
, max(case when not was_full_refresh then query_completed_at end) as last_incremental_run_completed_at

Check failure on line 70 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, max(case when not was_full_refresh then total_node_runtime end) as last_incremental_run_total_runtime

Check failure on line 71 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, max(case when not was_full_refresh then rows_affected end) as last_incremental_run_rows_affected

Check failure on line 72 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
{% if target.type == 'bigquery' %}

Check failure on line 73 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, max(case when not was_full_refresh then bytes_processed end) as last_incremental_run_bytes_processed
{% endif %}
from latest_models_runs

Check failure on line 76 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
where run_idx = 1

Check failure on line 77 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
group by 1

Check failure on line 78 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

)

Check failure on line 80 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

, final as (

Check failure on line 82 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select

Check failure on line 84 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
latest_models.*

Check failure on line 85 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, latest_model_stats.last_full_refresh_run_completed_at

Check failure on line 86 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, latest_model_stats.last_full_refresh_run_total_runtime

Check failure on line 87 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, latest_model_stats.last_full_refresh_run_rows_affected

Check failure on line 88 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
{% if target.type == 'bigquery' %}

Check failure on line 89 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, latest_model_stats.last_full_refresh_run_bytes_processed
{% endif %}
, latest_model_stats.last_run_completed_at

Check failure on line 92 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, latest_model_stats.last_run_total_runtime

Check failure on line 93 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, latest_model_stats.last_run_rows_affected

Check failure on line 94 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
{% if target.type == 'bigquery' %}

Check failure on line 95 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, latest_model_stats.last_run_bytes_processed
{% endif %}
, latest_model_stats.last_incremental_run_completed_at

Check failure on line 98 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, latest_model_stats.last_incremental_run_total_runtime

Check failure on line 99 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, latest_model_stats.last_incremental_run_rows_affected

Check failure on line 100 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
{% if target.type == 'bigquery' %}

Check failure on line 101 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, latest_model_stats.last_incremental_run_bytes_processed
{% endif %}
from latest_models

Check failure on line 104 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
left join latest_model_stats

Check failure on line 105 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
on latest_models.node_id = latest_model_stats.node_id

Check failure on line 106 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.

)

Check failure on line 108 in models/dim_dbt__current_models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select * from final
45 changes: 23 additions & 22 deletions models/dim_dbt__exposures.sql
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
with base as (
with
base as (

Check failure on line 2 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

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

Check failure on line 4 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
from {{ ref('stg_dbt__exposures') }}

Check failure on line 5 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

),
)

Check failure on line 7 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

exposures as (
, exposures as (

Check failure on line 9 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select
exposure_execution_id,
command_invocation_id,
node_id,
run_started_at,
name,
type,
owner,
maturity,
path,
description,
url,
package_name,
depends_on_nodes,
tags
from base
select

Check failure on line 11 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
exposure_execution_id

Check failure on line 12 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, command_invocation_id

Check failure on line 13 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, node_id

Check failure on line 14 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, run_started_at

Check failure on line 15 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, name

Check failure on line 16 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, type

Check failure on line 17 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, owner

Check failure on line 18 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, maturity

Check failure on line 19 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, path

Check failure on line 20 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, description

Check failure on line 21 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, url

Check failure on line 22 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, package_name

Check failure on line 23 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, depends_on_nodes

Check failure on line 24 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, tags

Check failure on line 25 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
from base

Check failure on line 26 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

)
)

Check failure on line 28 in models/dim_dbt__exposures.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select * from exposures
47 changes: 24 additions & 23 deletions models/dim_dbt__models.sql
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
with base as (
with
base as (

Check failure on line 2 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

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

Check failure on line 4 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
from {{ ref('stg_dbt__models') }}

Check failure on line 5 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

),
)

Check failure on line 7 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

models as (
, models as (

Check failure on line 9 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select
model_execution_id,
command_invocation_id,
node_id,
run_started_at,
database,
schema,
name,
depends_on_nodes,
package_name,
path,
checksum,
materialization,
tags,
meta,
alias
from base
select

Check failure on line 11 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
model_execution_id

Check failure on line 12 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, command_invocation_id

Check failure on line 13 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, node_id

Check failure on line 14 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, run_started_at

Check failure on line 15 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, database

Check failure on line 16 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, schema

Check failure on line 17 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, name

Check failure on line 18 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, depends_on_nodes

Check failure on line 19 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, package_name

Check failure on line 20 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, path

Check failure on line 21 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, checksum

Check failure on line 22 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, materialization

Check failure on line 23 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, tags

Check failure on line 24 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, meta

Check failure on line 25 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, alias

Check failure on line 26 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
from base

Check failure on line 27 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

)
)

Check failure on line 29 in models/dim_dbt__models.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select * from models
41 changes: 21 additions & 20 deletions models/dim_dbt__seeds.sql
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
with base as (
with
base as (

Check failure on line 2 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

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

Check failure on line 4 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
from {{ ref('stg_dbt__seeds') }}

Check failure on line 5 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

),
)

Check failure on line 7 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

seeds as (
, seeds as (

Check failure on line 9 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select
seed_execution_id,
command_invocation_id,
node_id,
run_started_at,
database,
schema,
name,
package_name,
path,
checksum,
meta,
alias
from base
select

Check failure on line 11 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.
seed_execution_id

Check failure on line 12 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, command_invocation_id

Check failure on line 13 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, node_id

Check failure on line 14 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, run_started_at

Check failure on line 15 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, database

Check failure on line 16 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, schema

Check failure on line 17 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, name

Check failure on line 18 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, package_name

Check failure on line 19 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, path

Check failure on line 20 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, checksum

Check failure on line 21 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, meta

Check failure on line 22 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
, alias

Check failure on line 23 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 8 spaces.
from base

Check failure on line 24 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Expected indent of 4 spaces.

)
)

Check failure on line 26 in models/dim_dbt__seeds.sql

View workflow job for this annotation

GitHub Actions / SQLFluff Lint

SQLFluff

LT02: Line should not be indented.

select * from seeds
Loading
Loading