Troubleshooting FQ-USR-304: Unable to Parse SQL - Unexpected Token 'Group'
search cancel

Troubleshooting FQ-USR-304: Unable to Parse SQL - Unexpected Token 'Group'

book

Article ID: 450226

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

When attempting to create a report or chart using Data Connect, the following error occurs:

FQ-USR-304: Unable to parse the sql: ... due to 'Encountered unexpected token: "Group" "GROUP" at line 1, column 55.'

The error indicates that the SQL parser was expecting keywords like ACTION, ANY, BYTE, etc. but instead encountered the token Group.

Cause

This issue is caused by a keyword conflict. In the SQL dialect used by Dataconnect, GROUP is a reserved word reserved for GROUP BY operations. If a column in the underlying data source is named group or if the SQL query uses AS Group as an alias, the parser misinterprets the syntax.

Resolution

To resolve this error, you must force the SQL parser to treat the word "group" as a column identifier rather than a reserved keyword.

Option 1: Apply Double Quoting (Recommended)
Wrap the column name or alias in double quotes in your SQL statement. This informs the parser that the string is a literal identifier.

Example Original SQL: SELECT day, account_id, group AS Group FROM DATACONNECT

Corrected SQL: SELECT day, account_id, "group" AS "Group" FROM DATACONNECT

Option 2: Rename the Alias
Change the column alias to a unique name that is not a reserved SQL keyword.

Example: SELECT day, account_id, group AS Account_Group FROM DATACONNECT

Additional Information

Charting Issues: If you are able to create a report but fail to generate a chart from the same data, ensure that the fields selected for the chart axes also reflect the quoting or renaming changes.

Data Connect Configuration: If the error persists, consider recreating the Data Connect connection and renaming the source column at the ingestion level to avoid future conflicts.