Navigation

1-8 Loading Documents From Compressed Files

This example demonstrates the UnpackContent processor and shows how to load content from one or more compressed files. In this example we use the same JSON data as in the previous JSON examples with an id property that is used to construct the URI.

  • Download Template
  • Processors:
    • GetFile – reads files from a watched directory
      • Properties
        • Input Directory: /some/path
    • UnpackContent – decompresses compressed files and sends each contained file matching the optional File Filter property to the next processor.
      • Properties
        • Packaging Format: zip
        • File Filter: \.json$
      • Settings
        • Automatically Terminate Relationships: failure, original
    • EvaluateJsonPath - Store values from JSON in FlowFile properties
      • Properties
        • Destination: flowfile-attribute
        • ml.json.id: $.id (custom property)
      • Settings
        • Automatically Terminate Relationships: failure, unmatched
    • 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