Member since
07-08-2020
5
Posts
0
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
691 | 10-25-2023 01:57 AM |
10-25-2023
01:57 AM
This indeed solved the problem. Thanks a lot for your support.
... View more
10-22-2023
03:19 AM
Hi, I am running NIFI in Kubernetes cluster with 3 nodes. After the upgrade of NIFI to 1.23.1 version, most of the time, the JSON messages or CSV files are corrupted something like below, which is causing serious production issues to my workflows. Actual message: {"RequestPeriod":"morning","TRANSMISSION_TYPE":"","ReturnDatetime":"2022-02-07T13:00:00+01:00", "PickupDatetime":"2022-02-07T08:00:00+01:00"} Corrupted message: 1:00"}{"RequestPeriod":"morning","TRANSMISSION_TYPE":"","ReturnDatetime":"2022-02-07T13:00:00+01:00", "PickupDatetime":"2022-02-07T08:00:00+0 Additional screenshots: OUTPUT: This is become an URGENT issue now. Any support would be highly appreciated.
... View more
Labels:
- Labels:
-
Apache NiFi
02-04-2021
12:04 AM
In order to convert JSON to XML, you can use ConvertRecord processor available as part of the NiFi tool (I worked on version: 1.11.4).
Following are the steps to configure ConvertRecord processor to convert JSON input to XML output:
Add a processor – ConvertRecord and right-click to “configure”
Click the Record Reader value and select Create New Service.
Select JSONTreeReader and click CREATE.
Similarly, click on the Record Writer value and select Create New Service.
Select XMLRecordSetWriter and click CREATE.
Final configuration of ConvertRecord should look like this:
Click à to configure JSONTreeReader to configure details about the schema that should be read by the registry. The controller service form should open:
Click configure of JSONTreeReader to start configuring the JSON Reader and configure as per the following screenshot:
When you select Create New Service in the above screenshot, another form opens up. Fill it up based on the following screenshot and click CREATE:
Fill in the rest of the information as follows:
Click à arrow next to AvroSchemaRegistry and now the controller service page would look like this:
Click configure against AvroSchemaRegistry and configure the registry. Add a new property with any schema name (for example: my_schema) and property value should be an AVRO schema that your JSON reader should read. In this case, you can take JSON message and using any online tool, create an AVRO schema and paste it here. You can create AVRO schema using an online tool (I used this one: AVRO schema generator)
Apply and enable the AvroSchemaRegistry and JSONTreeReader from the controller service.
Click configure on XMLRecordSetWriter in controller service and configure as follows:
Finally, ensure setting a new property to let the ConvertRecord know the schema name as follows in UpdateAttribute processor before sending the JSON message to ConvertRecord:
... View more
Labels:
07-15-2020
03:35 AM
1 Kudo
In order to convert JSON to XML, you can use ConvertRecord processor available as part of the NiFi tool (I worked on version: 1.11.4).
Here are the steps to configure ConvertRecord processor to convert JSON input to XML output:
Add a processor – ConvertRecord and right-click to “configure”:
Click on the “Record Reader value” and select “Create New Service”. Select “JSONTreeReader” and click CREATE:
Similarly, Click on the “Record Writer value” and select “Create New Service”. Select “XMLRecordSetWriter” and click CREATE:
Final configuration of Convert Record should look like this:
Click on “à to configure “JSONTreeReader” to configure details about the schema which should be read by the registry. The controller service form should open:
Click on “configure icon” of “JSONTreeReader” to start configuring the JSON Reader and configure as per below screenshot:
When you select “Create New Service” in the above screenshot, another form opens up. Fill it up based on below screenshot and click CREATE:
Fill in rest of the information as:
Click on à arrow next to “AvroSchemaRegistry” and now the controller service page would look like this:
Click on “configure icon” against “AvroSchemaRegistry” and configure the registry. Add a new property with any schema name (for example, my_schema), and property value should be an AVRO schema that your JSON reader should read. In this case, you can take JSON message and using any online tool, create an AVRO schema, and paste it here. You can create AVRO schema using an online tool (I used this one: AVRO schema generator)
Apply and enable the “AvroSchemaRegistry” and “JSONTreeReader” from controller service.
Click on “configure icon” on “XMLRecordSetWriter” in controller service and configure as below:
Finally, make sure to set a new property to let the ConvertRecord know the schema name as below in UpdateAttribute processor before sending the JSON message to ConvertRecord:
... View more
Labels: