Tutorial Presto 8.8 -

-- Create a sample table in memory CREATE TABLE memory.default.sales ( order_id BIGINT, product VARCHAR, amount DECIMAL(10,2), sale_date DATE );

-- List all catalogs SHOW CATALOGS; -- List schemas in the memory catalog SHOW SCHEMAS FROM memory; tutorial presto 8.8

connector.name=hive-hadoop2 hive.metastore.uri=thrift://localhost:9083 hive.allow-drop-table=true hive.s3.aws-access-key=YOUR_ACCESS_KEY hive.s3.aws-secret-key=YOUR_SECRET_KEY Create etc/catalog/postgresql.properties : -- Create a sample table in memory CREATE TABLE memory

connector.name=postgresql connection-url=jdbc:postgresql://localhost:5432/analytics connection-user=db_user connection-password=db_pass Create etc/catalog/memory.properties : sale_date DATE )

bin/launcher status Expected output: Running as [PID] . wget https://repo1.maven.org/maven2/io/prestosql/presto-cli/8.8/presto-cli-8.8-executable.jar mv presto-cli-8.8-executable.jar presto chmod +x presto ./presto --server localhost:8080 You should see the Presto shell: presto> Part 3: Configuring Catalogs in Presto 8.8 Presto’s superpower is its connector architecture. Let’s set up three common catalogs. 1. Hive Connector (for S3 or HDFS) Create etc/catalog/hive.properties :

SELECT p.product_name, p.category, s.sale_amount FROM postgresql.public.products p JOIN memory.default.sales s ON p.product_id = s.order_id WHERE s.sale_date > DATE '2025-01-01'; Here, Presto 8.8 seamlessly pulls products from PostgreSQL and sales from the memory connector. Assuming you have a geotable with a geometry column (e.g., in Hive):

tutorial presto 8.8
© 2025 Lucas Premium
Todos os direitos reservados