![]() ![]() This opens the NiFi Flow Configuration window. To Enable Controller Services Select the gear icon from the Operate Palette: Then you will get the pop up as below select XML reader in compatible controller service drop-down as shown below:įollow the same steps to create a controller service for the JSON record set writer as below. In Convert record processor, the properties tab in the RecordReader value column drop down will get as below, then click on create new service. Using a JSON controller service that references the same AvroSchemaRegistry schema The AvroSchemaRegistry contains a "drivers" schema that defines information about each record (field names, field ids, field types) ![]() Using an XMLReader controller service that references a schema in an AvroSchemaRegistry controller service ![]() Step 3: Configure the ConvertRecord and Create Controller Services: Here we will use the UpdateAttribute to update the schema name for the Avro schema registry as below.Īs shown above, we added a new attribute schema.name as drivers value. Updates the Attributes for a FlowFile using the Attribute Expression Language and/or deletes the attributes based on a regular expression. Here we are ingesting the drivers.xml file drivers data from a local directory for that, we configured Input Directory and provided the file name. We scheduled this processor to run every 60 sec in the Run Schedule and Execution as the Primary node in the SCHEDULING tab. Here we are getting the file from the local directory. NiFi will ignore files it doesn't have at least read permissions for. Install Ubuntu in the virtual machine Click HereĬreates FlowFiles from files in a directory.Step 5: Configure the UpdateAttribute to update file extension. ![]() Step 4: Configure the UpdateAttribute to update the filename.Step 3: Configure the ConvertRecord and Create Controller Services:.Recipe Objective: How to convert files from XML format to JSON format in NiFi?. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |