E1000 parse-error
SQL could not be parsed.
| Code | Name | Category | Default |
|---|---|---|---|
E1000 | parse-error | correctness | error |
What it reports
The file contains SQL that sqlsift's parser can't read for the selected dialect.
Example
SELEC id FROM users;
error[E1000]: Parse error: Expected: an SQL statement, found: SELEC
--> q.sql:1:1
|
1 | SELEC id FROM users;
| ^
Fixed:
SELECT id FROM users;
Notes
- Check
--dialect: MySQL, SQLite or warehouse syntax (Snowflake, BigQuery, Redshift, Databricks) may not parse as PostgreSQL. See Dialects. - dbt / Jinja templates parse only with templating on (
--templating jinja, automatic in a dbt project); the error then suggests it. With templating on, an error on a template tag shows the tag (found: Jinja expression {{ ... }}): sqlsift can't tell what SQL it expands to there. See dbt and Jinja templates. - In TypeScript and JavaScript files, only tagged template literals (
sql`...`and the tags inembedded_sql_tags) are parsed as SQL, and the error points into the template. See SQL in TypeScript and JavaScript. - If the SQL is valid for your database, please open an issue. Meanwhile,
-- sqlsift:disable-fileorignoreskips the file.
Configuring
# sqlsift.toml
[rules]
parse-error = "warn" # or "off"
Or for a single line: -- sqlsift:disable E1000. The examples use the schema on the Rules page.