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.
NOTE
(For single-tenant deployments only) Using the SQL Search page will result in additional costs in your AWS account, because the page runs Amazon Athena queries. Query costs depend on the amount of data stored in your environment. For more information, see Amazon Athena Pricing in the AWS documentation.
- 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).
- 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.
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:
- From the left side of the page, click the menu button next to the table for which you want to see its table definition.
- 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
- 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:
- From the left side of the page, click the menu button next to the table for which you want to select the table rows.
- Click SELECT first 100 rows. The SQL query is automatically generated and begins to run.
- Once completed, query results display in the Results table below the SQL query editor.
Create Custom Queries
To create a custom query:
- 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.
- Select SQL Search from the list of menu options again to return to the SQL query editor and results page.
- Enter your query in the SQL query editor text box. For syntax assistance, click the SQL syntax documentation link above the text box.
- Click Run Query.
- If the query is valid, the results display in the Results section.
- 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.
Export Results to a CSV File
To export SQL query results to a file in CSV format:
- 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.
- Click Run Query.
- 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.
Once the results have been downloaded, you can open the file in your text reader or import it in your favorite spreadsheet application.
New File Version Behavior
When you process a file using a protocol, the file’s data resides in that protocol's tables. If you later process the same file or an updated version of the file using a new protocol, that file’s data is stored in the new protocol's tables, leaving the original protocol tables untouched. The Tetra Data Platform (TDP) does not delete the original files’ data from the original protocol tables.
Updated 11 months ago