livebook-dev / req_athena Goto Github PK
View Code? Open in Web Editor NEWConveniences for querying Amazon Athena with Req
Conveniences for querying Amazon Athena with Req
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:
We need to prepare aws_credentials
to it's first release (aws-beam/aws_credentials#30)
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)
token
is also know as AWS Session Token
or AWS Security Token
With this option, we can have 3 use cases:
:workgroup
, removing :ResultConfiguration
from request and adding :Workgroup
, using the output location already configured inside AWS Athena Console:output_location
and :workgroup
to override output location from AWS Athena Console: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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.