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.
Start your free trial

You might also like

Ten Things to Know About ModelOps

Ten Things to Know About ModelOps

Thomas Hill, Mark Palmer, Larry Derany
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
Data Superstream: Data Lakes and Warehouses

Data Superstream: Data Lakes and Warehouses

Alistair Croll, Lena Hall, Vini Jaiswal, Einat Orr, Wannes Rosiers, Jessica Larson, Ryan Blue, Tejas Chopra

Publisher Resources

ISBN: 9781098141844Errata PageSupplemental Content