Skip to content

Latest commit

 

History

History

presto

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Connecting Python and Presto with ADBC

Instructions

Tip

If you already have a Presto instance running, skip the steps to run Presto in a Docker container.

Prerequisites

  1. Install uv

  2. Install dbc

Set up Presto

  1. Install Docker

  2. Start a Presto instance:

    docker run -d --rm --name presto -p 8080:8080 prestodb/presto:latest

Connect to Presto

  1. Install the Presto ADBC driver:

    dbc install --pre presto
  2. Customize the Python script main.py as needed

    • Change the connection arguments in db_kwargs
      • Format uri according to the driver documentation, or keep it as is to use the TPC-H data included in the Presto Docker container image
  3. Run the Python script:

    uv run main.py

Clean up

Stop the Docker container running Presto:

docker stop presto