Skip to main content

Connecting to Amazon Athena

Configure AWS Services​

Set up AWS Athena​

You do not need to explicitly activate Athena as by default it is enabled. Although, if you have never used it in a selected region, you need to select an S3 bucket for storing query results.

To configure this service for the first time, find Athena Service in an AWS console. If it is the first launch in a region, you will see an Athena home screen. Click the Explore the query editor button, open the settings tab, and click the Manage button.

athena manage

Open a list of available buckets by clicking Browse S3 and select the bucket in which query results will be saved. IMPORTANT: If you cannot find a bucket, make sure it was created in the same region as currently selected Save settings.

s3 bucket for athena

Now you need to configure a custom Workgroup. Open the Workgroups tab and click the Create workgroup button.

workgroups tab

Set the name for the workgroup and select the S3 bucket (can be the very same bucket as previously selected for Athena). Additionally, you can uncheck Publish query metrics to AWS CloudWatch.

workgroup settings

Create an IAM user​

Dataedo connects to AWS Athena with an IAM user, which is a default authentication method for programmatic access. The account for Dataedo will require the following permissions:

  • AWSQuicksightAthenaAccess – to read metadata with Athena
  • AmazonS3FullAccess – to save query results in an S3 bucket
  • AWSLambdaRole – to run the Lambda function

First, create an IAM group with the required permissions. Find IAM Service in the AWS console, open the User Groups tab, and click the Create Group button.

create iam group

Give your group a distinctive name, and add the aforementioned permissions in the Attach permissions policies section.

create iam group form

Go back to the IAM service main window, open the Users tab, and click the Add user button. Give the user a name and select Access Key – Programmatic access in the Select AWS access type section.

access key iam user

Go next and add the user to the group created in the previous step. Other options can be left default.

add user to group

In the last step, AWS will provide you with an Access key ID and Secret access key. These are credentials to your IAM account which you will later use to connect to Athena with Dataedo. Store them safely (we recommend saving these values in an encrypted password manager file).

access key secret key iam

Importing Metadata in Dataedo Portal​

Entry point​

To start the Metadata Import flow, make sure you have the Connection Manager role.
Then navigate to:

Connections → Add new connection → Amazon Athena

This will open the import wizard described in the following steps.

Step 1. Host details​

Provide the name of the Connection, an optional description, and the AWS region in which your Athena instance runs.

info

A Connection in Dataedo represents a saved configuration for accessing a data source.
It can be reused for future imports and scheduling.

Host details

Step 2. Credentials​

Choose credentials from the list of existing ones available for the selected connector, or add new credentials.

Athena uses Access key credentials – the Access key ID and Secret access key of the IAM user you created in Create an IAM user.

Credentials

Step 3. Connection info​

Select the Athena Workgroup that Dataedo should use to run its queries. The workgroup determines the query result location and limits – see Set up AWS Athena.

Connection info

Step 4. Data Sources​

info

During one import you can read the metadata of up to 20 data sources. You can reuse the same connection to import more sources later.

  • Portal displays all Athena databases found in the data catalogs accessible with the provided credentials
  • you can select multiple databases at once and use the search box to narrow down results
  • each selected database should be given a Title, which will be visible in Dataedo
Data sources

Step 5. Objects to import​

For each selected database, you can refine which objects to import:

  • select object types: Tables and Views.
Objects to import
  • use Advanced filters to include or exclude objects with:
    • name patterns
    • object types
Advanced filters

Step 6. Schedule​

Configure scheduling options for each source individually. For Athena, you can schedule Metadata Import, Data Profiling, and Data Quality tasks:

  • choose the metadata extraction options (Append only, Reimport all included objects)
  • run daily, on selected weekdays, or on specific days of the month
  • choose an exact time of execution
  • Task state:
    • Active - the task will run as scheduled
    • Draft - the task is saved but not executed until you switch it to Active
  • Run Immediately - when checked, the task will also be executed right after you click Create connection
useful tip

Only one source in a metadata import can have Run Immediately selected.

Add Import Metadata task

Once saved, the task appears in the schedule list for that data source.

Schedule with a defined task
caution

You must configure at least one import task in the schedule section.
If you skip this, an empty database will be created and no metadata will be imported.


Importing Metadata in Dataedo Desktop​

Add new connection​

To connect to AWS Athena, create new documentation by clicking Add documentation and choosing Database connection.

Add connection

On the Add documentation window, choose Amazon Athena:

Amazon Athena on list

Connection details​

Provide connection details:

  • Authentication type - the authentication method you want to use
  • AWS Region - AWS region where Athena resides
  • Access Key - IAM user access key ID (for STS and Access key auth)
  • Secret Key - IAM user secret key (for STS and Access key auth)
  • Role Arn - Amazon Resource Name (ARN) of the IAM role to assume (for STS auth)
  • External Id (optional) - identifier used for enhanced security when assuming cross-account roles (for STS auth)
  • Data Catalog - Data catalog (Athena data source) you want to connect to
  • Workgroup - Athena workgroup
  • Database - Athena database
Athena connection

Importing Metadata​

When the connection is successful, Dataedo will read objects and show a list of objects found. You can choose which objects to import. You can also use advanced filter to narrow down the list of objects.

Athena filters

Confirm the list of objects to import by clicking Next.

The next screen allows you to change the default name of the documentation under which it will be visible in the Dataedo repository.

Athena documentation title

Click Import to start the import.

When done, close the import window with the Finish button.

Athena import finished
Dataedo is an end-to-end data governance solution for mid-sized organizations.
Data Lineage • Data Quality • Data Catalog