|
We need to create a Maven project in order to develop Presto custom function.
Create SimpleFunctionsFactory class to implement FunctionFactory interface.
Create a SimpleFunctionsPlugin class to implement Plugin interface.
We need to create a resource file which is specified in the implementation package.
Now move to the resource file location @ /path/to/resource/
Then add the changes,
Add the below dependencies to pom.xml file.
We need to create SimpleFunctions class using Presto attributes.
After the application is created compile and execute the application. It will produce the JAR file. Copy the file and move the JAR file into the target Presto server plugin directory.
Compilation
Execution
Now restart Presto server and connect Presto client. Then execute the custom function application as explained below,
Query
Result
|
Apache Presto Related Practice Tests |
---|
Apache HBase Practice Tests |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.