Steps to Build a Directive

  1. Clone the example repository from github.
    git clone git@github.com:hydrator/example-directive

  2. Implementing three interfaces define(), initialize() and execute().

  3. Build a JAR (mvn clean package)

  4. Deploy the JAR as a plugin into CDAP through UI, CLI, or Microservices.

  5. Use the plugin as follows:

[1] parse-as-csv :body ',' true [2] #pragma load-directives text-reverse,text-sanitization; [3] text-reverse :text [4] text-sanitization :description

More description of the above lines.

  • [2] Dynamically loads the two UDDs as CDAP Plugins.

  • [3] Uses the directive.

 

Created in 2020 by Google Inc.