You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Athena Query** provide simple interface to get athena query results.
4
+
5
+
Athena Query wad inspired and forked from [athena-express](https://github.com/ghdna/athena-express#readme).
6
+
7
+
> **Warning**
8
+
> Athena Query support aws-sdk v3 only. So if you use aws-sdk v2, we recommend to use [athena-express](https://github.com/ghdna/athena-express#readme).
9
+
10
+
## Installation
11
+
12
+
```
13
+
npm install athena-query @aws-sdk/client-athena
14
+
```
15
+
16
+
```
17
+
yarn add athena-query @aws-sdk/client-athena
18
+
```
19
+
20
+
## Usage
21
+
22
+
Athena Query provide [async generator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function*).
23
+
So we can use it with `for await () {}`,
24
+
25
+
```ts
26
+
import { Athena } from"@aws-sdk/client-athena";
27
+
importAthenaQueryfrom"athena-query";
28
+
29
+
const athena =newAthena({});
30
+
const athenaQuery =newAthenaQuery(athena);
31
+
32
+
forawait (const items ofathenaQuery.query("SELECT * FROM waf_logs;")) {
33
+
console.log(items); // You can get all items with pagination by query.
0 commit comments