-2

I have a problem when run a DBT project. Some of my SQL commands are longer then the limit (80). So I have got the following error info: enter image description here

I have tried to change the limit in dbt_project.yml and .sqlfluff. But none of the worked.

enter image description here

enter image description here

How to fix this problem and change the length limit?

dan1st
  • 12,568
  • 8
  • 34
  • 67
Feng Chen
  • 2,139
  • 4
  • 33
  • 62

1 Answers1

1

That's a linter-related issue, so most probably nothing to do with your dbt_project.yml.

In order to correctly set a max_line_length value in your .sqlfluff file, you need to nest it under the [sqlfluff] tag. Meaning that your .sqlfluff file should look like this:

[sqlfluff]
dialect = snowflake
exclude_rules = L031
max_line_length = 120

See this example for SQLFluff's docs here.

Aleix CC
  • 1,601
  • 1
  • 7
  • 18