Ready to get started?

Download a free trial of the Amazon Athena ODBC Driver to get started:

 Download Now

Learn more:

Amazon Athena Icon Amazon Athena ODBC Driver

The Amazon Athena ODBC Driver is a powerful tool that allows you to connect with live data from Amazon Athena, directly from any applications that support ODBC connectivity.

Access Amazon Athena interactive query services data like you would a database, through a standard ODBC Driver interface.

Extract, Transform, and Load Amazon Athena Data in Informatica PowerCenter



Create a simple Workflow for Amazon Athena data in Informatica PowerCenter.

Informatica provides a powerful, elegant means of transporting and transforming your data. By utilizing the CData ODBC Driver for Amazon Athena, you are gaining access to a driver based on industry-proven standards that integrates seamlessly with Informatica's powerful data transportation and manipulation features. This tutorial shows how to create a simple Workflow in Informatica PowerCenter to extract Amazon Athena data and load it into a flat file.

Add Amazon Athena as an ODBC Data Source

If you have not already, install the driver on the PowerCenter server and client machines. On both machines, specify the connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.

Authenticating to Amazon Athena

To authorize Amazon Athena requests, provide the credentials for an administrator account or for an IAM user with custom permissions: Set AccessKey to the access key Id. Set SecretKey to the secret access key.

Note: Though you can connect as the AWS account administrator, it is recommended to use IAM user credentials to access AWS services.

Obtaining the Access Key

To obtain the credentials for an IAM user, follow the steps below:

  1. Sign into the IAM console.
  2. In the navigation pane, select Users.
  3. To create or manage the access keys for a user, select the user and then select the Security Credentials tab.

To obtain the credentials for your AWS root account, follow the steps below:

  1. Sign into the AWS Management console with the credentials for your root account.
  2. Select your account name or number and select My Security Credentials in the menu that is displayed.
  3. Click Continue to Security Credentials and expand the Access Keys section to manage or create root account access keys.

Authenticating from an EC2 Instance

If you are using the CData Data Provider for Amazon Athena 2018 from an EC2 Instance and have an IAM Role assigned to the instance, you can use the IAM Role to authenticate. To do so, set UseEC2Roles to true and leave AccessKey and SecretKey empty. The CData Data Provider for Amazon Athena 2018 will automatically obtain your IAM Role credentials and authenticate with them.

Authenticating as an AWS Role

In many situations it may be preferable to use an IAM role for authentication instead of the direct security credentials of an AWS root user. An AWS role may be used instead by specifying the RoleARN. This will cause the CData Data Provider for Amazon Athena 2018 to attempt to retrieve credentials for the specified role. If you are connecting to AWS (instead of already being connected such as on an EC2 instance), you must additionally specify the AccessKey and SecretKey of an IAM user to assume the role for. Roles may not be used when specifying the AccessKey and SecretKey of an AWS root user.

Authenticating with MFA

For users and roles that require Multi-factor Authentication, specify the MFASerialNumber and MFAToken connection properties. This will cause the CData Data Provider for Amazon Athena 2018 to submit the MFA credentials in a request to retrieve temporary authentication credentials. Note that the duration of the temporary credentials may be controlled via the TemporaryTokenDuration (default 3600 seconds).

Connecting to Amazon Athena

In addition to the AccessKey and SecretKey properties, specify Database, S3StagingDirectory and Region. Set Region to the region where your Amazon Athena data is hosted. Set S3StagingDirectory to a folder in S3 where you would like to store the results of queries.

If Database is not set in the connection, the data provider connects to the default database set in Amazon Athena.

Create an ETL Workflow in PowerCenter

Follow the steps below to create a workflow in PowerCenter to pull Amazon Athena data and push it into a flat file.

Create a Source Using the ODBC Driver

  1. In the powrmart.ini file found in %INFA_HOME%\clients\PowerCenterClient\client\bin, add the following line to the ODBCDLL section:
    CData=PMODBC.DLL
  2. In PowerCenter Workflow Manager, add a new ODBC relational connection, set the user name and password properties to the user for the machine on which the ODBC Driver is installed, and set the connect string to the System DSN for the driver (CData AmazonAthena Sys).
  3. In PowerCenter Designer, connect to your repository and open your folder.
  4. Select the Source Analyzer, click the sources menu, and select Import from Database...
  5. In the drop-down menu for ODBC data source, select the DSN you previously configured (CData AmazonAthena Sys).
  6. Click connect and select the tables and views to include.
  7. Click OK.

Create a Flat File Target Based on the Source

  1. Select the Targets Analyzer and drag and drop the previously created source onto the workspace. Using the existing source copies the columns into the target.
  2. Right-click the new target, click edit, and change the database type to flat file.

Create a Mapping to Between Amazon Athena Data and a Flat File

  1. Click on the Mapping Designer.
  2. Drag the source and target to the workspace (name the new mapping, if prompted).
  3. Right-click on the workspace and select Autolink by Name.
  4. Drag the columns from the source qualifier to the target definition.
  5. Save the folder (Ctrl + S).

Create Workflow Based on the Mapping

With the source, target, and mapping created and saved, you are now ready to create the workflow.

  1. Right-click the mapping and select generate workflow to open the Workflow Generation wizard.
  2. Create a workflow with a non-reusable session.
  3. Ensure that you have properly configured the connection object (to the relational connection we created earlier) and set the prefixes.
  4. Configure the Connection as needed.
  5. Review the Workflow and click Finish.

With a workflow created, you can open the PowerCenter Workflow Manager to access and start the workflow, quickly transferring Amazon Athena data into a flat file. With the ODBC Driver for Amazon Athena, you can configure sources and targets in PowerCenter to integrate Amazon Athena data into any of the elegant and powerful features in Informatica PowerCenter.