8000 GitHub - keziacatrece01/blog-presto-local: hive/presto connection to s3 bucket
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

keziacatrece01/blog-presto-local

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Presto Environment

About

This environment will allow you to run Presto (Using docker-compose).

It Includes the following:

  • MariaDB
  • Hive 3.x
  • Presto

Prerequisite

Update the following configuration files with your AWS credentials:

  • etc/s3.properties
  • hive/conf/hdfs-site.xml
  • hive/conf/hive-site.xml

Running

$ docker-compose up -d

Running Hive Server (optional)

$ docker-compose exec -d hive hiveserver2 

This will start Hive server in the background.

You could use beeline to connect to the server after it's up and running

$ docker-compose exec hive beeline -u jdbc:hive2://localhost:10000

To create schemas and tables in Hive read the hivequery.md located in the hive directory.

using Presto CLI

$ docker-compose exec presto presto-cli --catalog s3 --schema default

Use the schema created throguh the Hive Server. (In this example the schema name is metrics)

docker-compose exec presto presto-cli --catalog s3 --schema schema_name 

Then query the table name we created in the schema.

SELECT * FROM table_name LIMIT 2;

And you have a table full of data!

Screen Shot 2022-08-04 at 7 44 24 AM

About

hive/presto connection to s3 bucket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 53.8%
  • Dockerfile 46.2%
0