Integration / Apache NiFi Interview Questions
What is the ConvertRecord processor and how is it used for format conversion?
ConvertRecord is a NiFi processor that converts FlowFile content from one data format to another using the NiFi record model. Its sole job is to read records using one format and write them out in another. The conversion logic lives entirely in the RecordReader and RecordWriter Controller Services — not in ConvertRecord itself.
Configuration is minimal: just a Record Reader and a Record Writer. Examples:
- CSV → JSON: CSVReader + JsonRecordSetWriter
- JSON → Avro: JsonTreeReader + AvroRecordSetWriter
- Avro → Parquet: AvroReader + ParquetRecordSetWriter
- JSON → CSV: JsonTreeReader + CSVRecordSetWriter
The schema used for conversion can be inferred from the data (for self-describing formats like Avro and Parquet), declared inline in the reader/writer configuration, or fetched from a Schema Registry. Using a Schema Registry ensures output always conforms to a validated, versioned schema.
ConvertRecord performs streaming conversion — records are read and written one at a time without loading the entire FlowFile into memory, making it suitable for very large files. The output FlowFile's mime.type attribute is automatically updated by the writer to reflect the new format.
More Related questions...