Use TDP to Query Athena SQL Tables

This page describes how an Admin user can use the TetraScience Data Platform (TDP) to query Athena SQL tables.
To query the available Athena SQL tables, you use the SQL Search page:

  1. In the TDP, click the Hamburger icon at the top left corner of the page to expand the TDP menu options (or hover over the list of icons to display the menu options).
4747

Hamburger icon

  1. After clicking the Hamburger Menu icon, the icon changes to an X. Select SQL Search from the list of menu options that appears on the left side of the page.
13881388

SQL query editor and results page

From the SQL query editor and results page, you can:

  • View the SQL table structure and definitions
  • View the first 100 rows of content
  • Generate custom queries
  • Export results to a CSV file

View the Table Structure and Definitions

To view the structure of a table:

  1. From the left side of the page, click the menu button next to the table for which you want to see its table definition.
495495

SQL Query table options

  1. Click View table info to open the Table definition pane which shows this information:
  • Table name and time when table was created, last updated, and last accessed
  • Names of table columns and their data types
  • Parameters (such as the type of file or classification) and whether it contains encrypted data
780780

Table definition pane

  1. When you are finished reviewing the table data, click Close.

View the First 100 Rows in the Table

To view the first 100 rows in a table:

  1. From the left side of the page, click the menu button next to the table for which you want to select the table rows.
  2. Click SELECT first 100 rows. The SQL query is automatically generated and begins to run.
  3. Once completed, query results display in the Results table below the SQL query editor.
902902

SQL Query results

Create Custom Queries

To create a custom query:

  1. Determine which table or tables you want to query. To review information about the SQL table structure and details, navigate to: Account > SQL Access.

📘

Waters Empower Tables

Click here for Waters Empower Table Structure and Relationships.

  1. Select SQL Search from the list of menu options again to return to the SQL query editor and results page.
  2. Enter your query in the SQL query editor text box. For syntax assistance, click the SQL syntax documentation link above the text box.
  3. Click Run Query.
  • If the query is valid, the results display in the Results section.
11851185

Successful Query

  • If there is a issue with the query, an error display in the Results section. Review the error message to fix the query, and then click Run Query again.
11851185

Query Error

Export Results to a CSV File

To export SQL query results to a file in CSV format:

  1. From the SQL Query page, enter your query in the SQL query editor text box. For syntax assistance, click the SQL syntax documentation link above the text box.
  2. Click Run Query.
  3. To export a successful query's results to a CSV file format for easier data analysis (for example, to a spreadsheet), click the small export icon above the Results table to download and export results.
12051205

Export Results to CSV

Once the results have been downloaded, you can open the file in your text reader or import it in your favorite spreadsheet application.


Did this page help you?