This page describes the steps required to create a new custom plugin, generate the jars, and subsequent deployment of the custom plugin into CDFCDAP.
...
N/A
Steps
The creation and deployment of custom plugins involves 3 three broad steps.
One time setup on your local machine to write the java code.
Writing the plugin code and building the jar.
Deploying the plugin in Data FusionCDAP.
...
One Time Setup
Clone Cloud Source repository to local machine
Install Google Cloud SDKon your local machine following the instructions available at:
https://cloud.google.com/sdk/docs/quickstart-macos
Run
gcloud init
to initialise initialize your session with the right user name and project.
Set user name as the appropriate appropriate.
Set project id to the project id hosting the cloud source repository.
Authenticate using
gcloud auth login
command:
https://cloud.google.com/source-repositories/docs/authentication
Follow instructions on the new web page that opens up, and choose the account using which that you want to authenticate.
When successfully authenticated, you will see a web page with below message:
You are now authenticated with the Google Cloud SDK!
Clone Cloud Source Repository to the local machine using the following command:
gcloud source repos clone <repository_name> --project=<project-id>
...
Install VS Code IDE or any other IDE of your choice:
https://code.visualstudio.com/
Install JDK 8.
Download and install Java Java:
Set JAVA_HOME.
Run the below command to get java home directory:
/usr/libexec/java_home -V
Set JAVA HOME:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home
Install Maven.
Download installable binary apache-maven-3.6.3-bin.tar.gz from: https://maven.apache.org/download.cgi#
Follow the installation instructions here https://www.baeldung.com/install-maven-on-windows-linux-mac
Build Plugin Jar
In VS Code, on the Terminal pane,
Write plugin code in the suitable path in the cloned directory structure:
e.g., /Users/<username>/<repo_name>/<plugin-name>
Navigate to the directory where your plugin code is located in the repository path e.g., /Users/<username>/<repo_name>/<plugin-name>
Run the following command to build plugin jar:
/opt/apache-maven/bin/mvn install
This will create a new sub-directory ‘Target’ with the jar and json files for the plugin as below -:
<plugin_name>-1.25-SNAPSHOT.jar
<plugin_name>-1.25-SNAPSHOT.json
Deploy Plugin in Data Fusion
...
Page Properties | ||
---|---|---|
| ||
|