Skip to content

derekennui/presto-go-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

presto-go-sql

This project allows you to have easy access to your different datasources like mysql,hive.

step 1: config your presto url.

step 2: pass the sql you want to execute.

step 3: return the query result in json format.

For example,we have presto catalog mysql,schema test and table Persons:

PersonID LastName FirstName Address City

1 White Clover 305 - 14th Ave. S. Suite 3B Seattle

2 Wilman Kala Keskuskatu 45 Helsinki

we pass sql[select * from mysql.test.Persons limit 10] and get the result:

[{"address":"305 - 14th Ave. S. Suite 3B","city":"Seattle","firstname":"Clover","lastname":"White","personid":1}, {"address":"Keskuskatu 45","city":"Helsinki","firstname":"Kala","lastname":"Wilman","personid":2}]

About

convert your sql to json format result through presto query

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages