Giter VIP home page Giter VIP logo

req_athena's Issues

Allow cache to be disabled

In this case, we need to somehow force a mechanism to compute a new cache. The simplicity of this option will depend if Athena allows us to force a query. If not, we will have to come up with some scheme within Kino.

Finish aws_credentials support

We're doing Code.ensure_loaded? at runtime which can be very slow: https://github.com/livebook-dev/req_athena/blob/v0.1.4/lib/req_athena.ex#L392.

I believe an easy fix is in that spot to change:

- Code.ensure_loaded?(:aws_credentials)
+ unquote(Code.ensure_loaded?(:aws_credentials))

However there are some other things to consider:

Parameterized query doesn't work

credential = [...]

Req.new()
|> ReqAthena.attach(credential)
|> Req.post!(athena: {"SELECT ?", [1]})

throws error

** (CaseClauseError) no case clause matching: {nil, false}
    (req_athena 0.1.2) lib/req_athena.ex:188: ReqAthena.handle_athena_result/1
    (req 0.3.5) lib/req/request.ex:705: anonymous fn/2 in Req.Request.run_response/2
    (elixir 1.14.2) lib/enum.ex:4751: Enumerable.List.reduce/3
    (elixir 1.14.2) lib/enum.ex:2514: Enum.reduce_while/3
    (req 0.3.5) lib/req/request.ex:704: Req.Request.run_response/2
    (req 0.3.5) lib/req.ex:327: Req.post!/2
    (req_athena 0.1.2) lib/req_athena.ex:271: ReqAthena.execute_prepared_query/1
    #cell:5eknz4ezrwqs47sqb5n4owthwp2eqjr3:6: (file)

Add `:workgroup` option

With this option, we can have 3 use cases:

  1. Use :workgroup, removing :ResultConfiguration from request and adding :Workgroup, using the output location already configured inside AWS Athena Console
  2. Use :output_location and :workgroup to override output location from AWS Athena Console
  3. Use only :output_location

We should define a rule with :output_location and :workgroup to define if both are empty ("" or nil), we should raise. If one of them are valid, we should execute one of the use cases.

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.