Skip to Content

Query error reasons

Query syntax error

Your warehouse could not run the query because the SQL has a syntax error.

Reason in E1005Diagnostic codeWho can fix itDoes a retry help?
QUERY_INVALIDDBN-QRY-001Your adminNo

What this means

Your warehouse could not run the query because the SQL has a syntax error. The warehouse parsed the SQL of the metric and rejected it. This includes a wrong function name, a type mismatch and a column that is not in the GROUP BY on some engines.

What people see

WhoMessageNext step
Admin or API callerThe data source could not run this query. It has a syntax error.Ask your admin to fix the SQL of this metric.
Embed viewerThis chart has a data setup problem.Contact your admin.

How to fix it

  1. Open the metric and its SQL.
  2. Fix the SQL and run it.
  3. Save the metric.

Warehouse codes behind it

WarehouseCodes
MySQL, SingleStore1064
PostgreSQL, Redshift, CockroachDBSQLSTATE 42601
ClickHouse62 (SYNTAX_ERROR)
SQL Server, Microsoft Fabric102
DatabricksPARSE_SYNTAX_ERROR
BigQueryinvalidQuery
AthenaMALFORMED_QUERY
TrinoSYNTAX_ERROR, EXPRESSION_NOT_AGGREGATE, TYPE_MISMATCH, AMBIGUOUS_NAME, FUNCTION_NOT_FOUND
Elasticsearchparsing_exception

Ask for help

Every error has a six-character ref, for example Ref A1B2C3. API callers find it in details.ref. Search for the ref in Settings > Diagnostics > Logs to see the full log line, or send the ref and the time of the error to support.

On this page