Search before asking
What Happened
Rule L025 incorrectly removed an alias that was used in the argument to the FLATTEN table function call.
Expected Behaviour
I would expect rule L025 to recognize that the table alias is being used and leave it as is.
Observed Behaviour
Rule L025 removed a table alias that was in use.
How to reproduce
dbt % echo 'select * from table1 t, table(flatten(t.body)) as u' | sqlfluff fix -d snowflake -r L025 -
select * from table1, table(flatten(t.body))
Dialect
snowflake
Version
sqlfluff, version 1.4.1
Configuration
.sqlfluff
[sqlfluff]
templater = dbt
dialect = snowflake
# allow sqlfluff to run on a file of any size
large_file_skip_byte_limit = 0
[sqlfluff:templater:dbt]
project_dir = .
profiles_dir = ~/.dbt
[sqlfluff:rules]
tab_space_size = 4
max_line_length = 80
indent_unit = space
capitalisation_policy = lower
[sqlfluff:layout:type:comma]
line_position = leading
# Function names should be lower case
[sqlfluff:rules:L030]
extended_capitalisation_policy = lower
.sqlfluffignore
dbt_packages/
macros/
target/
Are you willing to work on and submit a PR to address the issue?
Code of Conduct
Search before asking
What Happened
Rule L025 incorrectly removed an alias that was used in the argument to the
FLATTENtable function call.Expected Behaviour
I would expect rule L025 to recognize that the table alias is being used and leave it as is.
Observed Behaviour
Rule L025 removed a table alias that was in use.
How to reproduce
Dialect
snowflake
Version
sqlfluff, version 1.4.1
Configuration
.sqlfluff
.sqlfluffignore
Are you willing to work on and submit a PR to address the issue?
Code of Conduct