xuanronaldo opened a new pull request, #6265:
URL: https://github.com/apache/nifi/pull/6265

   ## PutIoTDB
   
   ### Properties of PutIoTDB
   
   | property      | description                                                
  | default value | necessary |
   | ------------- | 
------------------------------------------------------------ | ------------- | 
--------- |
   | Host          | The host of IoTDB.                                         
  | null          | true      |
   | Port          | The port of IoTDB.                                         
  | 6667          | true      |
   | Username      | Username to access the IoTDB.                              
  | null          | true      |
   | Password      | Password to access the IoTDB.                              
  | null          | true      |
   | Record Reader | Specifies the type of Record Reader controller service to 
use <br />for parsing the incoming data and determining the schema. | null      
    | true      |
   | Time Field    | The field name which represents time. It can be updated by 
expression language. | Time          | false     |
   | Schema        | The schema that IoTDB needs doesn't support good by 
NiFi.<br/>Therefore, you can define the schema here. <br />Besides, you can set 
encoding type and compression type by this method.<br />If you don't set this 
property, the inferred schema will be used.<br /> It can be updated by 
expression language. | null          | false     |
   | Aligned       | Whether using aligned interface?  It can be updated by 
expression language. | false         | false     |
   | MaxRowNumber  | Specifies the max row number of each tablet.  It can be 
updated by expression language. | 1024          | false     |
   
   ### 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`. Otherwise, the 
property `Time Field` should be set to represent it.
   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`:
   
   ```json
   {
        "timeType": "long",
        "field": [{
                "tsName": "root.sg.d1.s1",
                "dataType": "INT32",
                "encoding": "RLE",
                "compressionType": "GZIP"
        }, {
                "tsName": "root.sg.d1.s2",
                "dataType": "INT64",
                "encoding": "RLE",
                "compressionType": "GZIP"
        }]
   }
   ```
   
   **Note**
   
   1. The JSON of schema must contain `timeType` and `fields`.
   2. There are only two options `long` and `string` for `timeType`.
   3. The columns `tsName` and `dataType` must be set.
   4. The tsName must start with `root.`.
   5. The supported `dataTypes` are `INT32`, `INT64`, `FLOAT`, `DOUBLE`, 
`BOOLEAN`, `TEXT`.
   6. The supported `encoding` are `PLAIN`, `DICTIONARY`, `RLE`, `DIFF`, 
`TS_2DIFF`, `BITMAP`, `GORILLA_V1`, `REGULAR`, `GORILLA`.
   7. The supported `compressionType` are `UNCOMPRESSED`, `SNAPPY`, `GZIP`, 
`LZO`, `SDT`, `PAA`, `PLA`, `LZ4`.
   
   ## Relationships
   
   | relationship | description                                          |
   | ------------ | ---------------------------------------------------- |
   | success      | Data can be written correctly or flow file is empty. |
   | failure      | The shema or flow file is abnormal.                  |
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to