In Neuron ESB CU4 there is a flat file parser that can be used to convert single record format flat files into XML. The supported flat files must have the following attributes: fixed-width or delimited. The following delimiters are supported:
- Comma
- Tab
- Vertical Bar (otherwise known as “Pipe-Delimited”)
- Semicolon
- Custom string (any combination of characters)
All records in the flat file must conform to the same definition. The only exception to this are leading records and trailing records which can be ignored.
Using the Flat File Parser
Process Definition
The flat file parser is included as a Business Process step in Neuron ESB Explorer. To use the flat file parser, create a new Business Process (or use an existing one) and drag the Flat File Process step from the Process Steps toolbox onto the Business Process Designer:
Creating a Flat File Definition
The flat file parser includes a wizard that will assist users in creating the flat file definition. The flat file definition cannot be created without using the wizard. The Flat File Wizard requires a sample flat file in order to create the definition. This sample flat file can either be imported into the new Neuron ESB Text Repository located by navigating to Repository->Documents->Text Documents within the Neuron ESB Explorer or, it can be retrieved directly from the file system.
- To start the wizard, right-click on the Flat File Parser step in the process designer and select Flat File Wizard…
- On the Welcome page, click Next:
- On the File Type page, select the type of file to process – Fixed Width or Delimited. If Delimited is selected, the appropriate delimiter must also be supplied. If something other than the provided options are needed, select Custom String and enter the character(s) to be used as a delimiter. Click Next:
If Fixed Width is selected, continue with step 4. If Delimited is selected, skip to step 8.
- On the Fixed-Width Flat File page, either select a sample flat file from the repository or the file system. To select a sample from the repository, select the Repository radio button and select from one of the files listed. To select a file from the repository it must be imported before running the wizard. To select a sample from the file system, select the File System radio button and click the ellipsis button to browse for a file from the file system. Some flat files include column header names in the first line. If your flat file includes column headers, check the box for First Row Contains Column Names. Also, if you want the Flat File Parser to ignore any of the leading or trailing rows, indicate how many of each row to ignore:
- Once you have selected a fixed-width document the preview pane will display the first 10 rows:
- When parsing a fixed-width file you need to set the column breaks. To set a column break, click anywhere in the preview pane and a vertical line will appear. Click the line again and it will disappear. Note – you don’t have to click on the ruler above the preview pane, just click inside the preview pane:
- After selecting all the column breaks, click Next. Skip to step 10.
- If you selected Delimited in step 3, the Comma-Delimited Flat File page will appear. On this page, either select a sample flat file from the repository or the file system. To select a sample from the repository, select the Repository radio button and select from one of the files listed. To select a file from the repository it must be imported before running the wizard. To select a sample from the file system, select the File System radio button and click the ellipsis button to browse for a file from the file system. Some flat files include column header names in the first line. If your flat file includes column headers, check the box for First Row Contains Column Names. Also, if you want the Flat File Parser to ignore any of the leading or trailing rows, indicate how many of each row to ignore:
- Unlike the preview pane for fixed-width files you do not need to set column breaks. This file includes headers in the first row. Click Next:
- When you check the “First Row Contains Column Names” checkbox, the column names are automatically populated. However, you can still change these names on the Column Details page. After confirming the column details, click Finish to close the wizard.
After finishing the wizard, the flat file definition is stored as a process property. You can re-run the wizard and see the same values you selected the previous time you ran it.
To test the Flat File Parser, use the Process Tester and use the same sample data you used when running the Wizard.
Read more about Peregrine Connect
-
Rabbit MQ Topics
Introduction Due to the open-source nature of RabbitMQ and constant updates, it is...
-
Port Sharing
One of Neuron ESB’s scalability features is the ability to install multiple...
-
The Integration Journey to...
The Integration Journey to Digital Transformation with Peregrine Connect
-
Saving Time and Money by...
Neuron ESB Application Integration and Web Service Platform: A Real-World Example...
-
Loomis Case Study
Loomis Chooses Peregrine Connect as Their No/Low-Code Integration Platform:...
-
Elektro Gorenjska
Peregrine Connect Eliminates Over 30% of Point-to-Point Integrations and reduces...
-
Decision Test Data Mapping
- Use decisions to drive the execution of...
-
Map Testing
Learn how to utilize FlightPath's testing functions...