Using TDP to View Athena SQL Table Information

This topic explains how to query Athena tables in the TDP. If you are interested in using a third-party tool instead, see this topic instead.

πŸ“˜

NOTE:

For more information on how Athena tables are structured in relation to the IDS, see this topic.

Using the Data Page to Connect to Athena Tables and to View Athena Table Structure

You can use the Data page to view the Athena tables you have access to as well as the table structure. You can also specify the username and password needed for the TDP to access the tables..

Opening the Data Page

To open the Data page, complete the following steps.

  1. Click your profile icon, then select Account from the menu that appears.
872872

Profile Icon

306306

Profile Menu

  1. Select the Data option from the menu on the left side of the screen.
446446

Profile Menu

  1. The Data page appears. You can provide the username and password for the Athena tables. You can also view the available SQL tables and view the table definitions. Note that if you want to actually query the tables from within TDP, you'll need to look at the SQL Query option. The SQL Query option is discussed in more detail later in this article.

Note also the connection parameters that you would might need if you or someone in your organization wants to use a third-party tool to connect to the Athena tables or view S3 output files.

Connecting to Athena Tables

To connect to Athena tables from within the TDP so that you can use SQL to query them, complete the following steps.

  1. Access the Data page. Instructions on how to do that are in the previous section.
  2. Add the username and password needed to access the tables in AWS.
29672967

Data Page

Viewing the Table Structure

To view the table structure, complete the following steps.

  1. Access the Data page. Instructions on how to do that are in the previous section.
  2. The SQL tables appear in the bottom 1/2 of the page.
  3. Click the table to view the table definition.
19341934

SQL Table Definition

Using the SQL Search Page to Query Athena Tables

You can use the SQL Search Page to the tables that are available to you, view the table definitions, see the first 100 rows of content, and generate custom queries.

Opening the SQL Query Page

To open the SQL Query page, complete the following steps.

  1. Click the main menu and select the SQL Search option.
204204

Main Menu Icon

702702

SQL Search Menu Optionn

  1. The SQL Search page appears.
19111911

SQL Query Page

Viewing the Table Definition

To view the structure of a table, complete the following steps.

  1. In the SQL Query page, click the menu button next to the table you want to see the table definition for.
495495

SQL Query Menu

  1. Click the View table info option.
  2. The table definition window appears. It contains information about the table name, creation time, when the table was last updated, and last accessed. It also shows you the names of table columns and their data types. Parameters, such as the type of file (classification) and whether it has encrypted data are also available.
804804

Table Definition

  1. When you are done, click the Close button.

Viewing the First 100 Rows in the Table

To view the first 100 rows in a table, complete the following steps.

  1. In the SQL Query page, click the menu button next to the table you want to view.
  1. Click the "Select first 100" rows option.
  2. The SQL query is automatically generated and begins to run. Query results appear in the table below the query.
11961196

Creating a Custom Query

To create a custom query, complete the following steps.

  1. Determine which table/tables you want to query. If you need some information on the way the SQL tables are structured, see the SQL Table Structure topic.

πŸ“˜

NOTE:

Water's Empower Tables are outlined in Advanced Topics: Waters Empower Tables.

  1. In the SQL Query page, type your query in the SQL Query Editor text box. If you need help with syntax, click the SQL syntax documentation link that appear above the text box.
  2. Click the Run Query button.
  • If the query is valid, the results appear in the results section.
11851185

Successful Query

  • If there is a problem with the query, an error appears in the Results section of the page. Read the message to learn how to fix the query, then click Run Query again.
11851185

Query Error