Giter Site home page Giter Site logo

Comments (3)

iconara avatar iconara commented on September 20, 2024

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.

RFayez avatar RFayez commented on September 20, 2024

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.

iconara avatar iconara commented on September 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.