PrestoDB Questions & Answers

Answers to your questions about PrestoDB

Topics

Data Lakehouse Architecture Explained

November 16, 20214 min read

The term Data Lakehouse has become very popular over the last year or so, especially as more customers are migrating their workloads to the cloud. This article will help to … Continue reading Data Lakehouse Architecture Explained

How to use mathematical functions and operators and aggregate functions for Presto?

September 21, 20216 min read

Presto offers several classes of mathematical functions that operate on single values and mathematical operators that allow for operations on values across columns. In addition, aggregate functions can operator on … Continue reading How to use mathematical functions and operators and aggregate functions for Presto?

What is a Presto lag example?

August 31, 20212 min read

The Presto lag function a window function that returns the value of an offset before the current row in a window. One common use case for the lag function is … Continue reading What is a Presto lag example?

How do I get the date_diff from previous rows?

August 24, 20211 min read

To find the difference in time between consecutive dates in a result set, Presto offers window functions. Take the example table below which contains sample data of users who watched … Continue reading How do I get the date_diff from previous rows?

How do I use the approx_percentile function in Presto?

August 9, 20216 min read

The Presto approx_percentile is one of the approximate aggregate functions, and it returns an approximate percentile for a set of values (e.g. column). In this short article, we will explain … Continue reading How do I use the approx_percentile function in Presto?

Can I write back or update data in my Hadoop / Apache Hive cluster through Presto?

July 13, 20212 min read

Using Presto with a Hadoop cluster for SQL analytics is pretty common especially in on premise deployments.  With Presto, you can read and query data from the Hadoop datanodes but … Continue reading Can I write back or update data in my Hadoop / Apache Hive cluster through Presto?

How do I convert Unix Epoch time to a date or something more human readable with SQL?

July 13, 20211 min read

Many times the Unix Epoch Time gets stored in the database. But this is not very human readable and conversion is required for reports and dashboards.  Example of Unix Epoch … Continue reading How do I convert Unix Epoch time to a date or something more human readable with SQL?

How do I transfer data from a Hadoop / Hive cluster to a Presto cluster?

July 13, 20212 min read

Hadoop is a system that manages both compute and data together. Hadoop cluster nodes have the HDFS file system and may also have different types of engines like Apache Hive, … Continue reading How do I transfer data from a Hadoop / Hive cluster to a Presto cluster?

Presto substring operations: How do I get the X characters from a string of a known length?

July 7, 20212 min read

Presto provides an overloaded substring function to extract characters from a string, your usage of the function may. We will use the string “Presto String Operations” to demonstrate the use … Continue reading Presto substring operations: How do I get the X characters from a string of a known length?

Spark SQL | What is Spark SQL & Spark SQL Guide | Ahana

June 30, 20212 min read

What is Spark SQL? Spark is a general purpose computation engine for large-scale data processing. At Spark’s inception, the primary abstraction was a resilient distributed dataset (RDD), an immutable distributed … Continue reading Spark SQL | What is Spark SQL & Spark SQL Guide | Ahana

Query Data Lake With Presto | Presto Google Cloud | Ahana

June 24, 20213 min read

How do I query a data lake with Presto? A data lake is a centralized repository that allows you to store all your structured and unstructured data at any scale. … Continue reading Query Data Lake With Presto | Presto Google Cloud | Ahana

Presto EMR S3 Timeout Error | Presto Query Timeout | Ahana

June 24, 20212 min read

Why am I getting a Presto EMR S3 timeout error? If you’re using AWS EMR Presto, you can use the S3 select pushdown feature to push down compute operations (i.e. … Continue reading Presto EMR S3 Timeout Error | Presto Query Timeout | Ahana

Do I need to move my data to query it with Presto?

June 3, 20211 min read

No, Presto queries your data in-place so you don’t need to move it. If you’re using AWS S3 for your data lake, for example, you wouldn’t need to ingest it … Continue reading Do I need to move my data to query it with Presto?

Presto Sync Partition Metastore & Metadata | Presto Sync | Ahana

May 4, 20212 min read

How do I sync my partition and metastore in Presto? Sync partition metadata is used to sync the metastore with information on the file system/s3 for the external table. Depending … Continue reading Presto Sync Partition Metastore & Metadata | Presto Sync | Ahana

How To Run A CTAS With A Query | Create Table As Query

May 4, 20212 min read

How do I run a CTAS (Create Table As) with a Query? There are a few different ways to run a CTAS with a Query in Presto. Below we’ll lay … Continue reading How To Run A CTAS With A Query | Create Table As Query

Difference Between Managed Table & External Tables | Ahana

May 4, 20212 min read

What is the difference between a managed table and external tables? The main difference between a managed and external table is that when you drop an external table, the underlying … Continue reading Difference Between Managed Table & External Tables | Ahana

What Is Presto & Presto FAQ | Presto Help & Support | Ahana

April 27, 20219 min read

What is Presto and what are its frequently asked questions (FAQ)?

What Is Trino & Trino Data | Trino SQL FAQs & Support | Ahana

April 22, 20218 min read

What Is Trino & FAQs Trino can query data where it is stored, without needing to move data into separate warehouse or analytics database. Queries are executed in parallel with … Continue reading What Is Trino & Trino Data | Trino SQL FAQs & Support | Ahana

Price-Performance Ratio of AWS Athena Presto vs Ahana Cloud for Presto

April 13, 20214 min read

Price-Performance Ratio of AWS Athena Presto vs Ahana Cloud for Presto Both AWS Athena and Ahana Cloud are based on the popular open-source Presto project which was originally developed by … Continue reading Price-Performance Ratio of AWS Athena Presto vs Ahana Cloud for Presto

AWS Glue Partition Limits For AWS Athena | Ahana

April 1, 20212 min read

What are the AWS Glue partition limits and does it apply to AWS Athena? Typically you’ll use AWS Glue to create the data sources and tables that Athena will query. … Continue reading AWS Glue Partition Limits For AWS Athena | Ahana

Concurrency Performance Using Presto With AWS Athena Service | Ahana

March 9, 20213 min read

What level of concurrency performance can I expect using Presto as part of the AWS Athena service? I’m getting a lot of my workloads queued up when I use AWS … Continue reading Concurrency Performance Using Presto With AWS Athena Service | Ahana

Getting Deterministic Performance Out Of Amazon Athena Guide | Ahana

March 5, 20215 min read

How do I get deterministic performance out of Amazon Athena? What is Athena? Amazon Athena is an interactive query service based on Presto that makes it easy to analyze data … Continue reading Getting Deterministic Performance Out Of Amazon Athena Guide | Ahana

Using AWS Lambda To Connect To Data Sources With Athena | Ahana

March 5, 20213 min read

Do I have to use AWS Lambda to connect to data sources with Athena? The Athena Federated Query Journey AWS announced the public preview of Athena federated query in November … Continue reading Using AWS Lambda To Connect To Data Sources With Athena | Ahana

Geospatial Queries & Spatial Joins In Presto Guide | Ahana

March 4, 20214 min read

How do I do geospatial queries and spatial joins in Presto? A question that often comes up is “how do I do geospatial queries and spatial joins in Presto?”. Fortunately … Continue reading Geospatial Queries & Spatial Joins In Presto Guide | Ahana

How Do I Query JSON Documents With Presto | Query JSON Docs | Ahana

March 3, 20213 min read

How do I query JSON documents with Presto? JSON documents are a common data type. A lot of people collect logs and load them into s3. Then in order to … Continue reading How Do I Query JSON Documents With Presto | Query JSON Docs | Ahana

Latency Overhead For Presto Queries If Fits Into Memory | Ahana

March 1, 20212 min read

Is there latency overhead for Presto queries if everything fits into memory and doesn’t need to be distributed? Presto is both in-memory and distributed, so each work has memory and … Continue reading Latency Overhead For Presto Queries If Fits Into Memory | Ahana

Is Hive Metastore Hard Dependency Of Presto | Postgres With Presto | Ahana

March 1, 20211 min read

Is the Hive metastore a hard dependency of Presto, or could Presto be configured to use something else like Postgres? With Presto, there’s no hard dependency of having to use … Continue reading Is Hive Metastore Hard Dependency Of Presto | Postgres With Presto | Ahana

What are the differences between Presto and Apache Drill?

March 1, 20213 min read

The Differences Between Apache Drill vs Presto Drill is an open source SQL query engine which began life as a paper “Dremel: Interactive Analysis of Web-Scale Datasets” from Google in … Continue reading What are the differences between Presto and Apache Drill?

Zero Records Returned CSV | Zero Records AWS Athena | Ahana

February 3, 20212 min read

Why am I getting zero records when I use AWS Athena to query a CSV file? There’s a common error many AWS Athena users see when they query CSV files … Continue reading Zero Records Returned CSV | Zero Records AWS Athena | Ahana

Presto Graphql | Does Presto Work Natively With GraphQL | Ahana

February 3, 20211 min read

Does Presto work natively with GraphQL? Some users may have a primary data store that is GraphQL-based (AWS AppSync) and want to leverage Presto. For context, GraphQL falls in the … Continue reading Presto Graphql | Does Presto Work Natively With GraphQL | Ahana

Athena Query Waiting In Queue or Athena Query Stuck In Queued State

January 26, 20212 min read

Why does a single AWS Athena query get stuck in QUEUED state before being executed? One of the drawbacks of AWS Athena is the fact that as a user, you … Continue reading Athena Query Waiting In Queue or Athena Query Stuck In Queued State

How Presto Joins Data | Presto Data Connectors & Join Example | Ahana

January 14, 20214 min read

How Presto Joins Data Because Presto is a distributed system composed of a coordinator and workers, each worker can connect to one or more data sources through corresponding connectors. The … Continue reading How Presto Joins Data | Presto Data Connectors & Join Example | Ahana

Executing Presto Spark | Using Spark’s Execution Engine With Presto | Ahana

January 13, 20214 min read

Executing Presto Spark Executing Presto Spark queries is possible, but why leverage Spark as an execution framework for Presto’s queries when Presto is itself an efficient execution engine?  The fact … Continue reading Executing Presto Spark | Using Spark’s Execution Engine With Presto | Ahana

Query Exhausted Resources On This Scale Factor Error | Ahana

January 12, 20213 min read

When I run a query with AWS Athena, I get the error message ‘query exhausted resources on this scale factor’. Why? AWS Athena is well documented in having performance issues, … Continue reading Query Exhausted Resources On This Scale Factor Error | Ahana

Creating Tables In A S3 Bucket Issues | Ahana

January 11, 20214 min read

Creating tables in a S3 Bucket gives “Query failed External location must be a directory” So here’s why you are here. You are using Presto’s Hive connector and you want … Continue reading Creating Tables In A S3 Bucket Issues | Ahana

Big Data Query | Presto Big Data | Ahana

January 11, 20213 min read

Big Data Query When it comes to querying big data using standard SQL you have come to the right place as this is what Presto was designed to do. Presto, … Continue reading Big Data Query | Presto Big Data | Ahana

RDS Postgres Databases Complex Queries | Ahana

January 8, 20214 min read

I use RDS Postgres databases and need some complex queries done which tend to slow down my databases for everyone else on the system. What do I need to consider … Continue reading RDS Postgres Databases Complex Queries | Ahana

Advanced SQL Tutorial & SQL Queries Support

January 4, 20214 min read

Advanced SQL Tutorial JSON Presto has a wide-range of JSON functions. Consider this json test input data (represented in the query using the  VALUES function) which contains 3 key/value elements. … Continue reading Advanced SQL Tutorial & SQL Queries Support

Complex SQL Queries | SQL Complex Queries | Ahana

January 4, 20212 min read

Complex SQL Queries Complex SQL queries benefit from Presto’s distributed, parallel, in-memory processing architecture and cost-based optimizer. And with Presto’s federation capabilities even more complex queries can be unleashed on … Continue reading Complex SQL Queries | SQL Complex Queries | Ahana

Advanced SQL Queries with Presto | SQL Queries Presto | Ahana

December 14, 20202 min read

Advanced SQL Queries with Presto Advanced SQL features and functions are used by analysts when, for example, complex calculations are needed, or when many tables (perhaps from multiple sources) need … Continue reading Advanced SQL Queries with Presto | SQL Queries Presto | Ahana

Presto Platform Overview: Interactive Analytic Queries

December 14, 20202 min read

Presto Platform Overview Presto is an open source distributed SQL query engine for running interactive analytic queries against data sources of all sizes. Some of the world’s most innovative and … Continue reading Presto Platform Overview: Interactive Analytic Queries

How to Stop Presto Tutorial | EMR Restart Presto Tutorial | Ahana

December 10, 20201 min read

How To Stop Presto If you are using the presto-admin tool this is how to stop Presto safely: $ presto-admin server stop In addition these commands are also useful: presto-admin … Continue reading How to Stop Presto Tutorial | EMR Restart Presto Tutorial | Ahana

Presto New Releases & Latest Release

December 10, 20201 min read

Presto New Releases Where is the latest release of PrestoDB? And where can I find the release notes? Where is the documentation? These are common questions with easy answers. Presto’s … Continue reading Presto New Releases & Latest Release

How Much Memory To Give A Presto Worker Node | Presto Memory | Ahana

December 10, 20203 min read

How Much Memory To Give A Presto Worker Node Presto is an in-memory query engine and so naturally memory configuration and management is important. A common question that comes up is … Continue reading How Much Memory To Give A Presto Worker Node | Presto Memory | Ahana

Show Tables From Schemas With Presto | Presto Information_Shema | Ahana

November 30, 20203 min read

How to Show Tables From All Schemas with Presto In Presto it is straightforward to show all tables in a schema e.g. If we have a MySQL data source/catalog that … Continue reading Show Tables From Schemas With Presto | Presto Information_Shema | Ahana

Convert Presto Bigint To Timestamp | Bigint To Timestamp Presto | Ahana

November 30, 20202 min read

How To Convert Bigint to Timestamp with Presto UNIX timestamps are normally stored as doubles. If you have UNIX timestamps stored as big integers then you may encounter errors when … Continue reading Convert Presto Bigint To Timestamp | Bigint To Timestamp Presto | Ahana

Convert Timestamp To Date With Presto | Ahana

November 30, 20203 min read

How do I convert timestamp to date with Presto? Luckily Presto has a wide range of conversion functions and they are listed in the docs.  Many of these allow us … Continue reading Convert Timestamp To Date With Presto | Ahana

Case Sensitive Search Configuration with Presto | Presto Regex | Ahana

November 30, 20203 min read

Case Sensitive Search Configuration with Presto When dealing with character data, case sensitivity can be important when  searching for specific matches or patterns. But not all databases and query engines … Continue reading Case Sensitive Search Configuration with Presto | Presto Regex | Ahana

Use ORC Versus Parquet When Using Presto | Ahana

November 23, 20201 min read

When should I use ORC versus Parquet when using Presto? If you’re working with open data lakes using open source and open formats, you can have multiple formats. Presto works … Continue reading Use ORC Versus Parquet When Using Presto | Ahana

Benefits Of Hive Metastore With Presto | Ahana

November 23, 20202 min read

What’s the advantage of having your own Hive metastore with Presto? How does it compare to Amazon Glue? First let’s define what Apache Hive is versus Amazon Glue. Apache Hive … Continue reading Benefits Of Hive Metastore With Presto | Ahana