Skip to main content


...About 2 min


Apache NiFi Introduction

Apache NiFi is an easy to use, powerful, and reliable system to process and distribute data.

Apache NiFi supports powerful and scalable directed graphs of data routing, transformation, and system mediation logic.

Apache NiFi includes the following capabilities:

  • Browser-based user interface
    • Seamless experience for design, control, feedback, and monitoring
  • Data provenance tracking
    • Complete lineage of information from beginning to end
  • Extensive configuration
    • Loss-tolerant and guaranteed delivery
    • Low latency and high throughput
    • Dynamic prioritization
    • Runtime modification of flow configuration
    • Back pressure control
  • Extensible design
    • Component architecture for custom Processors and Services
    • Rapid development and iterative testing
  • Secure communication
    • HTTPS with configurable authentication strategies
    • Multi-tenant authorization and policy management
    • Standard protocols for encrypted communication including TLS and SSH


This is a processor that reads the content of the incoming FlowFile as individual records using the configured 'Record Reader' and writes them to Apache IoTDB using native interface.

Properties of PutIoTDB

propertydescriptiondefault valuenecessary
HostThe host of IoTDB.nulltrue
PortThe port of IoTDB.6667true
UsernameUsername to access the IoTDB.nulltrue
PasswordPassword to access the IoTDB.nulltrue
Record ReaderSpecifies the type of Record Reader controller service to use
for parsing the incoming data and determining the schema.
SchemaThe schema that IoTDB needs doesn't support good by NiFi.
Therefore, you can define the schema here.
Besides, you can set encoding type and compression type by this method.
If you don't set this property, the inferred schema will be used.
It can be updated by expression language.
AlignedWhether using aligned interface? It can be updated by expression language.falsefalse
MaxRowNumberSpecifies the max row number of each tablet. It can be updated by expression language.1024false

Inferred Schema of Flowfile

There are a couple of rules about flowfile:

  1. The flowfile can be read by Record Reader.
  2. The schema of flowfile must contains a field Time, and it must be the first.
  3. The data type of time must be STRING or LONG.
  4. Fields excepted time must start with root..
  5. The supported data types are INT, LONG, FLOAT, DOUBLE, BOOLEAN, TEXT.

Convert Schema by property

As mentioned above, converting schema by property which is more flexible and stronger than inferred schema.

The structure of property Schema:

	"timeType": "LONG",
	"fields": [{
		"tsName": "",
		"dataType": "INT32",
		"encoding": "RLE",
		"compressionType": "GZIP"
	}, {
		"tsName": "",
		"dataType": "INT64",
		"encoding": "RLE",
		"compressionType": "GZIP"


  1. The first column must be Time. The rest must be arranged in the same order as in field of JSON.
  2. The JSON of schema must contain timeType and fields.
  3. There are only two options LONG and STRING for timeType.
  4. The columns tsName and dataType must be set.
  5. The tsName must start with root..
  6. The supported dataTypes are INT32, INT64, FLOAT, DOUBLE, BOOLEAN, TEXT.
  8. The supported compressionType are UNCOMPRESSED, SNAPPY, GZIP, LZO, SDT, PAA, PLA, LZ4.


successData can be written correctly or flow file is empty.
failureThe shema or flow file is abnormal.

Copyright © 2024 The Apache Software Foundation.
Apache IoTDB, IoTDB, Apache, the Apache feather logo, and the Apache IoTDB project logo are either registered trademarks or trademarks of The Apache Software Foundation in all countries

Have a question? Connect with us on QQ, WeChat, or Slack. Join the community now.