[teiid-issues] [JBoss JIRA] (TEIID-5363) SimpleDB connector not quoting table names in internal Select queries
Pranav K (JIRA)
issues at jboss.org
Mon Jun 11 09:20:00 EDT 2018
[ https://issues.jboss.org/browse/TEIID-5363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13589325#comment-13589325 ]
Pranav K commented on TEIID-5363:
---------------------------------
Thanks Steve. But I am not really sure whether this workaround would solve the problem, looking at where exactly I am facing the issue. I am facing the issue in SimpleDBConnectionImpl.getAttributeNames. This method gets called from my class (which is similar to SimpleDBMetadataProcessor) with domain names which are obtained from a previous call SimpleDBConnectionImpl.getDomains (which returns non-quoted domain names). When this non-quoted domain name gets passed to getAttributeNames, it leads to a failure -- so when I essentially don't have the attributeNames yet, I can't quote them in the nameInSource property and proceed.
Here's the stacktrace for the error I am talking about:
Caused by: com.amazonaws.services.simpledb.model.InvalidQueryExpressionException: The specified query expression syntax is not valid. (Service: AmazonSimpl
eDB; Status Code: 400; Error Code: InvalidQueryExpression; Request ID: b8d60ae4-9488-6f0e-214c-da4ff404dbb3)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1305)
at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:852)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:630)
at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:405)
at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:367)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:318)
at com.amazonaws.services.simpledb.AmazonSimpleDBClient.doInvoke(AmazonSimpleDBClient.java:1039)
at com.amazonaws.services.simpledb.AmazonSimpleDBClient.invoke(AmazonSimpleDBClient.java:1009)
at com.amazonaws.services.simpledb.AmazonSimpleDBClient.select(AmazonSimpleDBClient.java:958)
at org.teiid.resource.adapter.simpledb.SimpleDBConnectionImpl.getAttributeNames(SimpleDBConnectionImpl.java:90)
at com.test.simpledb.SimpleDBMetadataProvider.getColumnMetadata(SimpleDBMetadataProvider.java:100)
> SimpleDB connector not quoting table names in internal Select queries
> ---------------------------------------------------------------------
>
> Key: TEIID-5363
> URL: https://issues.jboss.org/browse/TEIID-5363
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Reporter: Pranav K
> Assignee: Steven Hawkins
> Fix For: 11.0, 10.3.2
>
>
> Facing an issue while querying the Simple DB connector for a specific type of tables - the tables that contain a hyphen in the name.
> According to the SimpleDB documentation:
> Attribute and domain names may appear without quotes if they contain only letters, numbers, underscores (_), or dollar symbols ($) and do not start with a number. You must quote all other attribute and domain names with the backtick (`).
> (https://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/QuotingRulesSelect.html)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the teiid-issues
mailing list