Comments (3)
The most common use case for this driver is to use the JDBC API to run a query and get the results as one operation. JDBC is a synchronous API and this driver makes interaction with Athena synchronous even though the Athena API is asynchronous.
However, this driver also provides access to the execution ID, which means you can do a mix if synchronous and asynchronous if you want. See "Getting the query execution ID from a ResultSet" in the readme for an example.
from athena-jdbc.
Thank you so much iconara for your quick feedback and help.
I have one more question, In the "Getting the query execution ID from a ResultSet" section, the resultSet will not return until the query is completely finalized, So query execution id in result set metadata will not be used for checking if the query execution is finished or not in such case. is my understanding correct?
from athena-jdbc.
Yeah, you're right, I misremembered the implementation. The Statement#execute
call does not allow access to the execution ID before the result is available, so the mix of sync and async is not possible. The reason we added ResultSet#getQueryExecutionId
was that we wanted access to statistics and metadata, which is only available after completion anyway.
If you need access to the execution ID while the query is running I think it would be an interesting feature to add. I think you could add a AthenaStatement#executeAsync
that returns a subclass of Future<ResultSet>
that would also have a property that provides access to the execution ID.
I don't have the bandwidth to work on anything like that right now, but I can write a spec if you want to take a stab at a PR.
from athena-jdbc.
Related Issues (8)
- INSERT INTO ... VALUE support HOT 1
- How to specify or change configuration HOT 4
- SdkClientException when using profile credentials HOT 1
- Feature Request: S3 Select Object as JDBC ( or Athena results as S3 Select results) HOT 4
- Not able use with SQL Client like SQLWorkbench - No support for catalog / schema / set Max Rows HOT 4
- Infinate loop in Result iterator for DML commands HOT 2
- Not able to run any query (SELEC 1)- getting timeout exception ( using via SQLWorkbench) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from athena-jdbc.