Integration / Apache NiFi Interview Questions
What is the MergeContent processor and how is it used?
MergeContent is a NiFi processor that combines multiple FlowFiles into a single FlowFile. It is the counterpart to processors like SplitText and SplitJSON, enabling a scatter-gather pattern: split a large FlowFile into pieces for parallel processing, then merge the results back together.
MergeContent supports two merge strategies:
Defragment: Reassembles fragments produced by a split operation. It reads the fragment.identifier and fragment.count attributes and waits until all fragments with the same identifier have arrived before merging them in order. This mode requires fragment attributes to be present.
Bin-Packing Algorithm: Collects FlowFiles and merges when one of several triggers fires — minimum and maximum FlowFile count, minimum and maximum bin size in bytes, or a maximum wait time. Used for batching many small FlowFiles into a larger one for efficient downstream writing (e.g., batching records before writing to S3 as Parquet).
Output format options include: Binary Concatenation (concatenate raw content), TAR (create a TAR archive), ZIP (create a ZIP archive), and FlowFileStream v3 (NiFi's internal format that preserves all attributes of each constituent FlowFile). The FlowFileStream format is used with UnpackContent to later unpack the merged FlowFile back into individual FlowFiles with attributes intact.
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...
