You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Python3.8 in a virtual environment, this query is showing an error even though it's working properly for Google BigQuery:
query="""SELECT CAST( DATE_ADD(invoice_date, INTERVAL payment_term DAY) AS STRING) AS invoice_due_date,FROM Invoicing"""parsed_query=sqlvalidator.parse(query)
parsed_query.is_valid() # crashes here
Here is the error:
File "home/alexandre/TestSqlValidator/venv/lib/python3.8/site-packages/sqlvalidator/sql_validator.py", line 25, in is_valid
self._validate()
File "home/alexandre/TestSqlValidator/venv/lib/python3.8/site-packages/sqlvalidator/sql_validator.py", line 31, in _validate
self.errors = self.sql_query.validate()
File "home/alexandre/TestSqlValidator/venv/lib/python3.8/site-packages/sqlvalidator/grammar/sql.py", line 133, in validate
errors += e.validate(known_fields)
File "home/alexandre/TestSqlValidator/venv/lib/python3.8/site-packages/sqlvalidator/grammar/sql.py", line 1064, in validate
errors += self.expression.validate(known_fields)
File "home/alexandre/TestSqlValidator/venv/lib/python3.8/site-packages/sqlvalidator/grammar/sql.py", line 557, in validate
errors += a.validate(known_fields)
AttributeError: 'str' object has no attribute 'validate'
The text was updated successfully, but these errors were encountered:
Using Python3.8 in a virtual environment, this query is showing an error even though it's working properly for Google BigQuery:
Here is the error:
The text was updated successfully, but these errors were encountered: