architecture, AWS, Data Engineering, presto

AWS EMR Presto Demystified | Everything you wanted to know about Presto



I would like to apologise … this is straight up cut the bullshit and give I need to get started on presto blog. If you need more detailed text, please read the supplied links. I used them once I get started, I hope they help you to. If you have any question , you are welcome to contact me directly (details below).

JDBC , in memory, sometimes faster than AWS Athena.

Presto uses External table in s3


Syntax limitations compared with hive

  1. INSERT OVERWRITE Statements are NOT Supported

Presto does not currently support INSERT OVERWRITE Statements. Please delete table before INSERT INTO. See the detail here.

2. Presto announced  support cost-based JOIN optimisations, meaning JOINs are automatically reordered based on table size.  unless you are using the latest version, Please make sure that smaller tables are on the right hand size of JOIN, and they must fit in memory. Otherwise out of memory exceptions will cause the query to fail.

Best practices


If you are looking for Hive like Dynamic partitions? Not supported in presto. 🙁

Tuning Articles:

How to use presto with AWS EMR:

1. Presto with Airpal– Airpal has many helpful features like highlighting syntax, export results to  CSV for download etc. Airpal provides the ability to find tables, see metadata, browse sample rows, write and edit queries, then submit queries all in a web interface. Please note that running an extra Airpal server will lead to extra EC2 costs.

2. Presto with Hue– You can use Presto with hue(hue-4.0.1) on EMR(version 5.9.0 or later). Hue provides Sql editor for running your presto queries in a web interface similar to Airpal(there may be a difference in features provided by hue as compared to Airpal). Hue is a better option than using Airpal as per my understanding, as you can install hue as a part of EMR installation.

3. Presto on EMR CLI– You can run presto using command line interface and monitor your queries using presto web UI. You can open “MASTER_NODE_IP:8889“(default) to monitor your cluster details. To enable web interfaces for EMR cluster, Kindly refer(

4. Use Athena instead of Presto on EMR– You can also use AWS Athena( if you want to process data present in S3. Amazon Athena is an interactive query service that makes it easy to analyse data in Amazon S3. Athena internally uses Presto as sql query engine.

5. Use presto, when you want to reduce costs on your AWS Athena service.

From presto reading Hive partitions including dynamic partitioning with Hive

Presto has full support for Hive partitions including dynamic partitioning with Hive [1,2].

On EMR, when you install Presto on your cluster, EMR installs Hive as well. Presto uses the Hive metastore to map database tables to their underlying files.

The INSERT query into an external table on S3 is also supported by the service. To query data from Amazon S3, you will need to use the Hive connector that ships with the Presto installation.



Scheduling job in presto

As per my understanding, you can use one of the following methods:

1. You can create a shell script and submit it as a step to the cluster. For example, you can create a script. Kindly refer [1] for more details on submitting step to a cluster.

presto-cli –catalog hive –schema default –execute “select count(*) from TABLE_NAME;”

2. Use a shell action to schedule an oozie workflow on EMR cluster(oozie needs to be installed as part of EMR cluster). Kindly refer this blog [2], which explains on how to use oozie workflows.

3. You can save your queries in hue and then run those saved queries in hue console.

Working example with Hive and presto:

  1. create table via hive
  2. select via presto

Presto Connectors

  1. kudu
  2. elasticseach
  3. apache phoenix
  4. AWS Redshift
  5. Thrift
  6. Cassandra

New features good lecture :

Cost reduction on Presto:

Trying this my my cost reduction article on AWS Athena, it may have use-full tips.



[1]. Submit step to an EMR cluster:

[2]. Oozie workflows:


Need to learn more about AWS big data (demystified)?


I put a lot of thoughts into these blogs, so I could share the information in a clear and useful way. If you have any comments, thoughts, questions, or you need someone to consult with, feel free to contact me:

1 thought on “AWS EMR Presto Demystified | Everything you wanted to know about Presto”

Leave a Reply