-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(athena): add amazon athena backend
- Loading branch information
Showing
55 changed files
with
1,927 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# Amazon Athena | ||
|
||
[https://aws.amazon.com/athena](https://aws.amazon.com/athena/) | ||
|
||
## Install | ||
|
||
Install Ibis and dependencies for the Athena backend: | ||
|
||
::: {.panel-tabset} | ||
|
||
## `pip` | ||
|
||
Install with the `athena` extra: | ||
|
||
```{.bash} | ||
pip install 'ibis-framework[athena]' | ||
``` | ||
|
||
And connect: | ||
|
||
```{.python} | ||
import ibis | ||
con = ibis.athena.connect(s3_staging_dir="s3://...") # <1> | ||
``` | ||
|
||
::: {.callout-note} | ||
## At a **minimum**, the `s3_staging_dir` argument must be provided. | ||
|
||
This argument tells the underlying driver library--`pyathena`--and ultimately | ||
Athena itself where to dump query results. | ||
::: | ||
|
||
1. Adjust other connection parameters as needed. | ||
|
||
## `conda` | ||
|
||
Install for Athena: | ||
|
||
```{.bash} | ||
conda install -c conda-forge ibis-athena | ||
``` | ||
|
||
```{.python} | ||
import ibis | ||
con = ibis.athena.connect(s3_staging_dir="s3://...") # <1> | ||
``` | ||
|
||
::: {.callout-note} | ||
## At a **minimum**, the `s3_staging_dir` argument must be provided. | ||
|
||
This argument tells the underlying driver library--`pyathena`--and ultimately | ||
Athena itself where to dump query results. | ||
::: | ||
|
||
1. Adjust other connection parameters as needed. | ||
|
||
## `mamba` | ||
|
||
Install for Athena: | ||
|
||
```{.bash} | ||
mamba install -c conda-forge ibis-athena | ||
``` | ||
|
||
```{.python} | ||
import ibis | ||
con = ibis.athena.connect(s3_staging_dir="s3://my-bucket/") # <1> | ||
``` | ||
|
||
::: {.callout-note} | ||
## At a **minimum**, the `s3_staging_dir` argument must be provided. | ||
|
||
This argument tells the underlying driver library--`pyathena`--and ultimately | ||
Athena itself where to dump query results. | ||
::: | ||
|
||
1. Adjust other connection parameters as needed. | ||
|
||
::: | ||
|
||
## Connect | ||
|
||
### `ibis.athena.connect` | ||
|
||
```python | ||
con = ibis.athena.connect( | ||
s3_staging_dir="s3://my-bucket/", | ||
) | ||
``` | ||
|
||
::: {.callout-note} | ||
## At a **minimum**, the `s3_staging_dir` argument must be provided. | ||
|
||
This argument tells the underlying driver | ||
library--[`pyathena`](https://laughingman7743.github.io/PyAthena/)--and | ||
ultimately Athena itself where to dump query results. | ||
::: | ||
|
||
### Connection Parameters | ||
|
||
```{python} | ||
#| echo: false | ||
#| output: asis | ||
from _utils import render_do_connect | ||
render_do_connect("athena") | ||
``` | ||
|
||
```{python} | ||
#| echo: false | ||
BACKEND = "Athena" | ||
``` | ||
|
||
{{< include ./_templates/api.qmd >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
# Cloud backend support policy | ||
|
||
Ibis supports a number of proprietary cloud backends. | ||
Ibis supports and tests some of the major proprietary cloud backends: | ||
|
||
Snowflake and Databricks cost money to test in our continuous integration test suite. | ||
- Google BigQuery | ||
- Snowflake | ||
- Databricks Cloud | ||
- Amazon Athena | ||
|
||
If funding dries up, support for these backends will become best effort. | ||
**All of these services cost money to run in our continuous integration test suite.** | ||
|
||
If you're interested in ensuring continued support for a cloud backend, please | ||
consider sponsoring Ibis development. | ||
If funding for these services dries up, support for these backends will move to | ||
best effort. | ||
|
||
The cost at the time of writing (2024-10-31) is about **$5,000 USD per year** | ||
split evenly between the Snowflake and Databricks backend. | ||
If you or your company are interested in ensuring continued maintenance for one | ||
of these backends, please get in touch with us on | ||
[Zulip](https://ibis-project.zulipchat.com/), or [open a GitHub | ||
issue](https://github.com/ibis-project/ibis/issues/new) and consider sponsoring | ||
Ibis development. | ||
|
||
Google has very generously supported the entire cost of testing the BigQuery | ||
backend for a number of years. | ||
## Current cost estimates | ||
|
||
- Google BigQuery: free, donated very generously by Google | ||
- Snowflake: $2500 USD per year | ||
- Databricks Cloud: $2500 USD per year | ||
- Amazon Athena: ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.