1-6 Ingest Line-Delimited JSON
This example demonstrates the SplitText processor and shows how to ingest line-delimited JSON. Like the previous JSON example, we will construct the URI from an ID property in the JSON.
- Download Template
- Sample Data (generated by Mockaroo)
Processors:
-
GetFile – reads files from a watched directory
-
Properties
- Input Directory: /some/path
-
Properties
-
SplitText – splits the line-delimited file into one file per line
-
Properties
- Line Split Count: 1
-
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