Integration / Apache NiFi Interview Questions
How does NiFi support schema evolution in data pipelines?
Schema evolution — handling changes in data structure without breaking pipelines — is supported primarily through the record model and schema registry integration.
NiFi's record-aware processors use Schema Access Strategies on RecordReaders and RecordWriters:
Infer Schema: The reader analyzes the data and derives a schema at runtime. Handles schema evolution naturally because the inferred schema always matches the current data shape, but may be inconsistent for heterogeneous datasets.
Use Schema from Registry: The reader fetches a versioned schema from a Schema Registry (Confluent Schema Registry or NiFi's built-in AvroSchemaRegistry). Schema evolution is governed by Avro compatibility rules: BACKWARD (new schema can read old data), FORWARD (old schema can read new data), or FULL compatibility. The registry enforces these rules on schema registration, preventing incompatible changes.
For handling missing fields: if an input record lacks a field present in the output schema, the writer uses the field's configured default value. For extra fields not in the output schema: the writer's Schema Validation property controls whether extra fields are ignored silently or cause routing to failure.
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...
