8000 Databricks - layout.newlines improperly formats templated queries · Issue #6817 · sqlfluff/sqlfluff · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Databricks - layout.newlines improperly formats templated queries #6817
Open
@StLWallace

Description

@StLWallace

Search before asking

  • I searched the issues and found no similar issues.

What Happened

We are using dbt with Databricks and just upgraded to the latest sqfluff release today. Queries that had no linting issues now do. Furthermore, the "fix" also will introduce line length violations.

Expected Behaviour

Example query with desired and previously correct formatting:

SELECT  
    col1,
    col2,
    {{ dbt_macro(['macro_arg']) }}
FROM {{ ref('dbt_model') }}

Observed Behaviour

(Bad) formatting with new release:

SELECT 
    col1,
    col2,
    {{ dbt_macro(['macro_arg']) }}     FROM {{ ref('dbt_model') }}

How to reproduce

sqlfluff fix {path to query}

Dialect

Databricks

Version

sqlfluff, version 3.4.0
sqlfluff-templater-dbt 3.4.0

Configuration

[sqlfluff]
dialect = databricks
templater = dbt

[sqlfluff:templater:dbt]
project_dir = {{ project dir }}
profiles_dir = dbt
profile = {{ profile }}
target = sqlfluff

[sqlfluff:templater:dbt:context]

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0