Skip to main content
1-Visitor
April 23, 2018
Solved

How to implement dbc connection from thingworx to Athena?

  • April 23, 2018
  • 1 reply
  • 1916 views

I just started looking into this, would really appreciate the guidance if anyone has already implemented or has any idea regarding how to go about this.

Best answer by supandey

Hi @chaitanya have you already looked into using JDBC extension for ThingWorx? If not you could download it via the ThingWorx Marketplace JDBC Connector Extension

 

This'll allow you to create a JDBC template using the Athena JDBC driver

1 reply

supandey5-Regular MemberAnswer
5-Regular Member
April 23, 2018

Hi @chaitanya have you already looked into using JDBC extension for ThingWorx? If not you could download it via the ThingWorx Marketplace JDBC Connector Extension

 

This'll allow you to create a JDBC template using the Athena JDBC driver

chaitanya1-VisitorAuthor
1-Visitor
April 23, 2018

Hi @supandey , 

Thanks for the response.
I have already installed jdbc extension which helped me create a thing with autogenerated jdbc template.Configuration for the thing to connect athena has been done.
Then I created service containing SQL query which has been tested in Athena query editor. Currently I am facing an issue invoking this service.

Please find application log below:

2018-04-23 14:06:15.052+0530 [L: ERROR] [O: c.t.w.BaseService] [I: ] [U: chaitanya] [S: ] [T: https-jsse-nio-8443-exec-3] [context: com.thingworx.webservices.context.HttpExecutionContext@4e2d91c9][message: Unable to Invoke Service hitAthena on athenaNew : Execute Update failed: java.sql.SQLException: [Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. Only one sql statement is allowed. Got: SELECT * FROM (select * from "db"."table";) T LIMIT 0]

5-Regular Member
April 23, 2018

@chaitanya if you already have a connection done to Athena I would recommend please closing this thread by accepting one of the threads replied under your question as accepted solution and then please open a new thread with your issue detailed with any error you might be encountering while invoking the service.

 

Looking forward to your new question.