A union of curiosity and data science

Knowledgebase and brain dump of a database engineer


Presto Cheat Sheet

Presto : https://prestodb.io/overview.html

 

Quick "Presto" docker setup from FB 2019 Demo: 
https://github.com/prestodb/f8-2019-demo

git clone https://github.com/prestodb/f8-2019-demo
cd f8-2019-demo
docker-compose up
open localhost:8888

 

Presto is a distributed system that runs on a cluster of machines. 
A full installation includes a coordinator and multiple workers.
Queries are submitted from a client such 
as the Presto CLI, to the coordinator. 
The coordinator parses, analyzes and plans the 
query execution, then distributes the 
processing to the workers.



installing presto : 
https://prestodb.io/docs/current/installation/deployment.html

installing the client (cli):
https://prestodb.io/docs/current/installation/cli.html

High level commands for the server:

bin/launcher run   # runs the server in the foreground. 
bin/launcher start # runs the server in the background
bin/launcher status #gives you the current spid and status
bin/launcher restart #restarts the service. 

When connecting to a JDBC SQL Server Database. 

Your connection URL should contain the database name you'd like to connect to. 

connector.name=sqlserver
connection-url=jdbc:sqlserver://localhost:port;databaseName=AdventureWorks;
connection-user=<username>
connection-password=<pass>

Presto schemas do not include sql databases only sql owners/schemas. 

 Launching the presto client:
https://prestodb.io/docs/current/installation/cli.html

bin/presto --server <IP>:<port> --catalog <name of config file catalog> --schema <default schema>

 

Obtain a damn good starter "etc" directory from sundog because presto doesn't come with one but it's needed:

wget http://media.sundog-soft.com/hadoop/presto-hdp-config.tgz

prerequisites:

Unix/Linux/Mac
python >2.4
java 8 "yum install java-1.8.0-openjdk" 


good SQL Server reference for Presto: https://docs.starburstdata.com/latest/connector/sqlserver.html

 

Web Interface info:
https://prestodb.io/docs/current/admin/web-interface.html

 

 Presto Configs from Sundog Media:
http://media.sundog-soft.com/hadoop/presto-hdp-config.tgz

 

presto-hdp-config (1).tgz (734.00 bytes)

#rename the presto jar and make it executable. 
don@Edge:~$ mv presto-cli-0.237.1-executable.jar presto_cli
don@Edge:~$ chmod +x presto_cli

 

 

deploy : https://prestodb.io/docs/current/installation/deployment.html

cli: https://prestodb.io/docs/current/installation/cli.html

add source: https://prestodb.io/presto-admin/docs/current/installation/presto-catalog-installation.html

tools: https://prestodb.io/download.html

driver: 

great alternatives:

 

 

 

Comments (1) -

  • iCE5YpD1XiV5wf

    3/24/2022 6:49:44 AM | Reply

    43919 81226hello!,I actually like your writing really a whole lot! percentage we maintain up a correspondence extra about your write-up on AOL? I want an expert on this region to unravel my difficulty. May possibly be that is you! Taking a appear forward to peer you. 954655

Add comment