Skip to content

jampp/presto-udfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Jampp Presto User Defined Functions

This repository contains the JSON_SUM aggregation function. It combines all the JSONs in a column by adding the shared keys and appending the rest. It's used as an example for our How to write custom Presto functions blogpost.

Build

Inside the presto-udfs folder, run:

mvn clean package

Docker testing

To setup a Docker container with the UDFs, run:

docker run --name presto -p 8080:8080 -v $PWD/presto-udfs/target/presto-jampp-udfs-0.306/:/usr/lib/presto/plugin/udfs prestosql/presto:346

This will add the UDFs to the /usr/lib/presto/plugin/ folder inside the container.

You can then connect to the Presto server through the Presto CLI. If you run the SHOW FUNCTIONS; command, you should see the json_sum on the list (it will appear once per input type).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages