Handling arrays, nested JSON, and complex fields

Modified on Thu, 11 Dec, 2025 at 8:43 PM

Summary

Clockspring processors expect flat fields. Arrays or nested objects require extraction or flattening before most processors can handle them.

Symptom

  • Errors about unsupported field types

  • Database writes fail

  • RecordReader cannot parse nested fields

  • JSONPath expressions return null or blank values

Root Cause

  • Nested objects are not supported directly in SQL

  • Arrays require splitting or flattening

  • RecordReaders interpret complex structures differently

  • EvaluateJsonPath may extract only top-level fields

How to Fix It

Flatten structures

Use JoltTransformJSON or UpdateRecord to convert nested fields into flat key/value pairs.

Extract array elements

Use SplitJson or EvaluateJsonPath with wildcards to break arrays into multiple FlowFiles.

Store raw JSON if needed

If the structure is too complex, store the full JSON in a text or jsonb column.

Validate RecordReader schema

Ensure schema matches the flattened structure.

Prevention

  • Avoid deep nesting when building integrations

  • Document expected field layout

  • Test data transformations before database writes

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article