Integration / Apache NiFi Interview Questions
What is the JoltTransformJSON processor and how do you use it?
JoltTransformJSON is a NiFi processor that transforms JSON content using the JOLT (JSON to JSON transformation) library. JOLT uses declarative JSON specifications (JOLT specs) to describe how an input JSON document should be restructured — renaming fields, changing nesting structure, filtering arrays, computing derived values — without writing imperative code.
JOLT supports several transformation types applied in a chain:
shift: The most common operation. Defines a mapping from input JSON paths to output JSON paths. Input paths can include wildcards (*), array indices ([]), and conditional matching.
default: Adds default values to the output for paths absent in the input.
remove: Removes specified paths from the document.
cardinality: Normalizes fields that may be either single values or arrays into a consistent array form.
sort: Alphabetically sorts JSON object keys.
A simple shift spec that renames firstName to first_name:
[{
"operation": "shift",
"spec": {
"firstName": "first_name",
"lastName": "last_name"
}
}]The JOLT spec itself supports NiFi EL, allowing dynamic spec construction from FlowFile attributes. The processor includes a Transform Tool in its configuration dialog for testing specs against sample input without running the full flow.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
