sqlvalidator
sqlvalidator copied to clipboard
validate() missing 1 required positional argument: 'known_fields'
Using python 3.9 and sqlvalidator==0.0.18
When running sqlvalidator.parse(query).is_valid()
i'm getting
def _validate(self):
self.validated = True
try:
> self.errors = self.sql_query.validate()
E TypeError: validate() missing 1 required positional argument: 'known_fields'
The class of self.sql_query is WithStatement
Hey @timotta
Thanks for opening an issue.
What's the content of the query
variable? :) So that I can reproduce the issue
I am getting similar issue. When I am validating the query using WITH to create an alias, then it is giving this error
I get this error when attempting to use WITH AS as well.
Example
with cte as (select * from a)
select * from cte