Skip to Content
Learning and Operating Presto
book

Learning and Operating Presto

by Angelica Lo Duca, Tim Meehan, Vivek Bharathan, Ying Su
September 2023
Intermediate to advanced
191 pages
4h 32m
English
O'Reilly Media, Inc.
Content preview from Learning and Operating Presto

Chapter 4. Client Connectivity

A Presto client is a process that queries Presto and shows the query results for a number of purposes, such as data analytics, ad hoc queries, and many more. Presto provides a variety of clients, written in different programming languages, including REST API, R, Python, JDBC, Node.js, and ODBC.

This chapter is organized into two parts. In the first part, you’ll learn how to deploy a Presto client. Although you can deploy a Presto client as a separate process running on an existing cluster node, in this chapter, you’ll implement the client on a different node to simulate an external application accessing the cluster. We’ll focus on implementing a client in the REST API, Python, R, JDBC, Node.js, and ODBC. You can easily extend the described procedure to the other programming languages supported by Presto.

In the second part, you’ll implement a practical web service in Python, querying Presto and showing the results in a simple dashboard. The goal of this example is to illustrate the potentialities of a Presto client.

Setting Up the Environment

To add a Presto client as a node of the Presto cluster, first you must set up the environment. Deploy the following three components already implemented in Chapter 3:

  • Presto client

  • Docker image that contains your Presto client

  • Kubernetes node that runs the Docker image in the Presto cluster

The code used in this section is available in the 04 directory of the book’s repository, which contains the configuration ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Learning Presto DB

Learning Presto DB

Matt Fuller
Rust in Motion

Rust in Motion

Carol Nichols, Jake Goulding
The Book of Dash

The Book of Dash

Adam Schroeder, Christian Mayer, Ann Marie Ward
Flow Architectures

Flow Architectures

James Urquhart

Publisher Resources

ISBN: 9781098141844Errata Page