Run Queries using CLI on Athena Tables

Today, I will discuss about Athena APIs which can be used in automation using shell scripting to fetch the Table data to perform validations like count, date, sum (aggregate functions), duplicate .I will explain the APIs using count validation in Athena. Get the Total records Details of the Athena tables using Athena APIs.STEP 1 : Use the below Command to get the query execution id for count Query of particular Table.API Used : start-query-executionaws athena start-query-execution –query-string “SELECT count(*) FROM $S3-Schema.$S3-Table” | grep [a-z] |awk -F “:” ‘{print $2}’|sed -e…