1-2 Extract values from JSON data
This example introduces the EvaluateJsonPath processor and demonstrates how to extract an ID value from JSON data to use in constructing the URI.
- Screencast (old, using InvokeHTTP instead of PutMarkLogic)
- Download Template
-
Processors:
-
GetFile – reads files from a watched directory
-
Properties
- Input Directory: /some/path
-
Properties
-
EvaluateJsonPath - Store values from JSON in FlowFile properties
-
Properties
- Destination: flowfile-attribute
- ml.json.id: $.id (custom property)
-
Settings
- Automatically Terminate Relationships: failure, unmatched
-
Properties
-
PutMarkLogic
-
Properties
- DatabaseClient Service: (your MarkLogic DatabaseClient Service)
- URI Attribute Name: ml.json.id
- URI Prefix: /json/
- URI Suffix: .json
-
Settings
- Automatically Terminate Relationships: failure, success
-
Properties
-
GetFile – reads files from a watched directory