-
-
Notifications
You must be signed in to change notification settings - Fork 827
AM07 throws an error whe using dbt_utils.union_relations
with include
or exclude
arguments
#5401
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
Comments
include
or exclude
argumentsdbt_utils.union_relations
with include
or exclude
arguments
Yep, have also had the same issue. CODE: with select * from unified_partitions GIVES: CRITICAL [AM07] Applying rule AM07 to 'models/STG/example/example.sql' threw an Exception: list index out of range Ill see what I can do about a PR but I'm very new to Open Source stuff 😅 |
I have the same issue with
|
In my case with a similar issue changing to a pattern of:
resolved the error |
Search before asking
What Happened
I'm linting a file with dbt_utils.union_relations with the
include
orexclude
arguments.Expected Behaviour
I would expect sqlfluff to execute normally and report on linting errors.
Observed Behaviour
Throws
IndexError: list index out of range
exceptions:How to reproduce
Here's an model example that shows this behaviour:
Dialect
redshift
Version
2.3.4
Configuration
[sqlfluff]
dialect = redshift
exclude_rules = L016,L031,L034,L039,L054,L059,L067
templater = dbt
large_file_skip_byte_limit = 30000
[sqlfluff:indentation]
tab_space_size = 2
[sqlfluff:rules:capitalisation.keywords]
capitalisation_policy = upper
[sqlfluff:rules:capitalisation.identifiers]
capitalisation_policy = upper
[sqlfluff:rules:capitalisation.functions]
capitalisation_policy = upper
[sqlfluff:rules:capitalisation.literals]
capitalisation_policy = upper
[sqlfluff:rules:capitalisation.types]
capitalisation_policy = upper
[sqlfluff:rules:references.special_chars] # Space needed for SFMC exports
allow_space_in_identifier = True
[sqlfluff:templater:jinja]
load_macros_from_path=macros
Are you willing to work on and submit a PR to address the issue?
Code of Conduct
The text was updated successfully, but these errors were encountered: