Issue
In the Input Data tool connecting to Athena using Simba driver when you use the Tables tab to build the query you receive the following error when testing the Query if the schema name contains dashes:
Error SQLPrepare: [Simba][Athena] (1040) An error has been thrown from the AWS Athena client. Athena Error No: 130, HTTP Response Code: 400, Exception Name: InvalidRequestException, Error Message: line 1:51: mismatched input '-'. Expecting: ')', ',', '.', 'AS', 'CROSS', 'EXCEPT', 'FOR', 'FULL', 'GROUP', 'HAVING', 'INNER', 'INTERSECT', 'JOIN', 'LEFT', 'LIMIT', 'NATURAL', 'OFFSET', 'ORDER', 'RIGHT', 'TABLESAMPLE', 'UNION', 'WHERE', <identifier> [Execution ID: ]
image.png
Alteryx produces below Invalid SQL from the tables tab:
SELECT * FROM AwsDataCatalog.medpro-prod-ds-rmf.claimant_info
There are not quotes around the schema name. Alteryx needs to put quotes around the schema name.
Environment Details
- Alteryx Designer
- Amazon Athena.
- Simba Athena driver.
Cause
Defect GDC-2066
Status: Open
Resolution
Defect GDC-2066 is target for resolution in future release.
Workaround
Use visual query builder to build the query. Alteryx produces this Valid SQL:
SELECT * FROM AwsDataCatalog."medpro-prod-ds-rmf".claimant_info
It correctly put quotes around the schema name.