Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can AWS Athena queries be run periodically (i.e., on a schedule)?

Is there any support for running Athena queries on a schedule? We want to query some data daily, and dump a summarized CSV file, but it would be best if this happened on an automated schedule.

like image 868
Murwiz Avatar asked May 26 '17 13:05

Murwiz


People also ask

Can I schedule an Athena query?

If you're using Athena in an ETL pipeline, use AWS Step Functions to create the pipeline and schedule the query. On a Linux machine, use crontab to schedule the query. Use an AWS Glue Python shell job to run the Athena query using the Athena boto3 API. Then, define a schedule for the AWS Glue job.

Can we run multiple queries in Athena?

Open the Amazon Athena console at https://console.aws.amazon.com/athena/ . In the left navigation pane, choose Workflows. In the Execute multiple queries tile, choose Get started. In the Get started dialog box, choose Deploy a sample project, and then choose Continue.

What does AWS Athena run on?

Built on Presto, runs standard SQL Amazon Athena uses Presto with ANSI SQL support and works with a variety of standard data formats, including CSV, JSON, ORC, Avro, and Parquet.

What are the different ways in which Athena can be accessed?

Amazon Athena can be accessed via the AWS Management Console, an API, or an ODBC or JDBC driver. You can programmatically run queries, add tables or partitions using the ODBC or JDBC driver.


1 Answers

Schedule an AWS Lambda task to kick this off, or use a cron job on one of your servers.

like image 175
Mark B Avatar answered Oct 05 '22 04:10

Mark B