-
1. Re: Problem querying specific tables with SimpleDB connector
rareddy Jun 4, 2018 9:48 AM (in response to pranavk)What is the issue you are facing? how did you import the metadata? Yes, if the translator already did not quote these tables then it is a bug, for which you can open a JIRA.
-
2. Re: Problem querying specific tables with SimpleDB connector
pranavk Jun 5, 2018 1:27 AM (in response to rareddy)Thanks for the response. I am using Teiid embedded, where I have created something like a wrapper connector over the Teiid-provided simpledb db connector which delegates some of the calls to SimpleDBConnectionImpl. For fetching the metadata of the source, I call methods on this connection object very similar to what happens in the Teiid metadata processor. Here, SimpleDBConnectionImpl.getAttributeNames is failing for domainNames which have a hyphen etc.
Have created a JIRA bug for the issue - TEIID-5363
-
3. Re: Problem querying specific tables with SimpleDB connector
pranavk Jun 11, 2018 3:27 AM (in response to pranavk)Thanks for the resolution for TEIID-5363.
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:
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)
-
4. Re: Problem querying specific tables with SimpleDB connector
shawkins Jun 11, 2018 7:52 AM (in response to pranavk)Please reopen the issue with that comment, and I'll have a look at addressing that.