Using Amazon Athena with Coco Alemana
Connect to Amazon Athena to work with data directly against your Athena tables.
About Athena
Section titled “About Athena”Amazon Athena is one of the remote sources that Coco Alemana supports natively. You can read data from existing tables, as well as save data to new tables entirely, without using the AWS Console. All of the actions within Coco Alemana also apply to Athena tables.
Setting up AWS Credentials
Section titled “Setting up AWS Credentials”You’ll need access to your AWS credentials. Specifically the Access Key ID
and Secret Key
. You can generate these in the AWS Console.
These keys generally look like this:
- Access Key ID:
AKIAIOSFODNN7EXAMPLE
- Secret Key:
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Your credentials should have all of the appropriate permissions to:
- Query Amazon Athena
- List S3 Buckets
- Save data to the S3 Output Bucket location.
For a list of managed AWS policies you can apply to your user, please go here.
1. Open the External Accounts Window
Section titled “1. Open the External Accounts Window”To provide your credentials to Coco Alemana, open the External Accounts...
pane, under the top-level Coco Alemana
menu.
2. Add a new External Account
Section titled “2. Add a new External Account”Press the “Add Account…” button, or the plus button on the bottom-left hand side of the window.
Select the “Amazon Web Services” option.
3. Connect Credentials
Section titled “3. Connect Credentials”Provide your credentials through one of the many options available.
4. Adjust Settings
Section titled “4. Adjust Settings”You’re able to change several settings such as the AWS Regions you want to search for data, and customize the workgroup and S3 output bucket that Athena will use to store results.
Load a Table from Athena
Section titled “Load a Table from Athena”1. Open a new source
Section titled “1. Open a new source”Once your credentials are configured, you’re able to load data from Athena. To start, you can create a new source via ⌘ N
, and select “Athena”.
2. Select a Table
Section titled “2. Select a Table”See your available databases and select a table you’d like to import. You can also search for a table in your database.
Modifying Athena Tables
Section titled “Modifying Athena Tables”You can modify Athena frames with the same actions as any other frame. The SQL used in Coco Alemana will translate into Athena (Trino) SQL on your behalf. This means you can work with a massive table without downloading it.
Exporting Data
Section titled “Exporting Data”You export data to Athena just like any other frame. You can also export an Athena frame to a local file. This process will take slightly longer, as it requires downloading everything onto your device.