Skip to main content

Querying databases from the AP

We have developed some simple packages to allow you to query our databases using R and Python on the Analytical Platform. You can use these packages to execute SQL queries on Athena databases, bringing the results into your environment as a DataFrame to do further analysis:

R - dbtools

Allows you to access Athena databases from the Analytical Platform using a reticulate wrapper around pydbtools. The README in the dbtools repository gives details on how to install and use the package with R. This package is maintained by the analytical platform user community.

R - Rdbtools

Allows you to access Athena databases from the Analytical Platform using an extension of the noctua R package. The README provides details. This package is maintained by the analytical platform user community.

Python - pydbtools

Allows you to access Athena databases from the Analytical Platform using the awswrangler python package, and adding features such as temp table creation. The README in the pydbtools repository gives details on how to install and use the package with Python. This package is maintained by the data engineering team.

This page was last reviewed on 5 May 2021. It needs to be reviewed again on 5 May 2022 by the page owner #ask-data-engineering .
This page was set to be reviewed before 5 May 2022 by the page owner #ask-data-engineering. This might mean the content is out of date.