Welcome to the Alteryx Knowledge Base
Knowledge Base / Designer / Error: "SQLPrepare: [Simba][Hardy] (80) Syntax or semantic analysis" thrown in server while exe...
Error: "SQLPrepare: [Simba][Hardy] (80) Syntax or semantic analysis" thrown in server while executing query: Invalid column reference
Created/Edited -
Summary
Description
Input Data (1) Error SQLPrepare: [Simba][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: Error while compiling statement: FAILED: SemanticException [Error 10002]: Line 1:33 Invalid column reference 'a.storenum'
Alternatively, user is getting the following error trying to write to Hadoop Hive with the Output tool:
Output Data (2) Unable to find field "test" in output record.
In the Visual Query Builder, the column names are prefaced by an 'a':
In the Output tool, you can see the table name precede the column name in the field map:
In the Select In-DB tool, the table name is part of the column name in the format tablename.columname:
Environment
- Alteryx Designer
- All versions
- Simba Hive ODBC Driver with DSN configured
- Version 2.6 or greater
Cause
Simba introduced a new feature in their driver that ensures that all column names are unique when reading in data. This feature is resulting in Alteryx not being able to recognize column names.
Resolution
Note
The below resolutions apply only if the error appears in the context of this change to the column names.
Solution A: Use Select * [...] in the query
- In the Alteryx workflow, open the Input tool that is throwing the error.
- Go to the SQL Editor tab.
- Remove references to individual columns from the query and use the wildcard asterisk (*) instead to read in all columns in the table.
Solution B: Add a Server Side Property to the DSN
Note: This is not a global setting, it is set for each DSN, individually.- Go to the Windows ODBC Data Source Administrator
- Open the DSN that is being used to connect for editing
- Click on Advanced Options
- Click on Server Side Properties
- Add the property
hive.resultset.use.unique.column.names=false
6. Hit OK on all the windows to save the changes
Solution C: Add a Server Side Property to the Driver Configuration
Note: This is a global setting, it will apply to ALL DSNs using the driver.
- Browse to the install folder for the Simba Hive ODBC driver. The default location is C:\Program Files\Simba Hive ODBC Driver
- Open the /lib folder inside the install folder
- Double-click DriverConfiguration64.exe to open the driver configuration dialog
- Click on Advanced Options
- Click on Server Side Properties
- Add the property
hive.resultset.use.unique.column.names=false
Solution D: Add a Connection String parameter
- In the Alteryx workflow, open the tool (Input or Output) that is throwing the error.
- Add the following parameter to the connection string to turn off unique column names:
EnableUniqueColumnName=0;
Was this article helpful?