SQL Lint Pipeline fails when I'm trying to publish tasks containing SYSTEM$GET_PREDECESSOR_RETURN_VALUE lines, altough they pass the SQL fluff tests locally on VS Code. Any idea how can i fix these without adding --noqa for that line ?
My code :
...
WHEN SYSTEM$GET_PREDECESSOR_RETURN_VALUE('previous_task_name') = 'TRUE'
AS
CALL ...
The error :
Found unparsable section: Line X position Y...
If I remove the "When" line above, it passes.
Tried --noqa and it works, but I need my code to pass the SQL lint tests.
You need to give us more context to fix this particular error, but a way to reproduce this error is creating a file with the following contents:
Then this would fail with the same error:
Which returns:
Which is easily fixed by changing the dialect to Snowflake:
Which returns:
As we don't know what version of sqlfluff you are using, or how you are calling it, or a complete sample of the code is tripping on - we can't go further for the purposes of this question. Please post a new one with more details if this doesn't fix the larger problem.