Skip to content

Commit

Permalink
Merge pull request ToolJet#3281 from ToolJet/feature/athena
Browse files Browse the repository at this point in the history
Feature ::  Amazon Athena plugin
  • Loading branch information
gsmithun4 authored Jun 29, 2022
2 parents 06d4701 + 37180f3 commit 6bc17b4
Show file tree
Hide file tree
Showing 19 changed files with 1,019 additions and 108 deletions.
75 changes: 75 additions & 0 deletions docs/docs/data-sources/athena.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@

# Athena

ToolJet can connect to Amazon Athena databases to read and write data.

- [Connection](#connection)
- [Querying-athena](#querying-amazon-athena)
- [Basic Operation](#basic-queries)

## Connection

ToolJet requires the following to connect to your Athena.

- **Database**
- **S3 output location**
- **Access key**
- **Secret key**
- **Region**

:::info
You can also configure for **[additional optional parameters](https://github.com/ghdna/athena-express)**.
:::

<div style={{textAlign: 'center'}}>

![ToolJet - Amazon Athena - Connection](/img/datasource-reference/athena/athena-connection.png)

</div>

## Querying Amazon Athena

- Click on `+` button of the query manager at the bottom panel of the editor and select the database added in the previous step as the datasource. Query manager then can be used to write SQL queries.

<div style={{textAlign: 'center'}}>

![ToolJet - Querying- Amazon Athena](/img/datasource-reference/athena/athena-query.png)

</div>

- Click on the `run` button to run the query.

**NOTE:** Query should be saved before running.

:::tip
Refer amazon athena docs here for more info: [link](https://docs.aws.amazon.com/athena/latest/ug/what-is.html)
:::

### Basic queries

:::tip
**Refer amazon athena docs here for more info:** [link](https://docs.aws.amazon.com/athena/latest/ug/what-is.html)
:::

#### Creating table


```sql
CREATE EXTERNAL TABLE student (
name STRING,
age INT
) LOCATION 's3://athena-express-akiatfa53s-2022/';
```

#### Inserting to table

```sql
INSERT INTO student
VALUES ('Lansing',1)
```

#### Select operation

```sql
SELECT * from student WHERE AGE=1
```
1 change: 1 addition & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const sidebars = {
'data-sources/airtable',
'data-sources/s3',
'data-sources/appwrite',
'data-sources/athena',
'data-sources/baserow',
'data-sources/bigquery',
'data-sources/firestore',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6bc17b4

Please sign in to comment.