This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
bw2:file_reader_tool [2023/07/12 12:02] wgates [Delimited Files] |
bw2:file_reader_tool [2024/09/24 15:51] (current) dlee [FileReader Tool] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Introduction (File Reader v2) ====== | ||
| - | This page describes the use of the “File Reader” tool in Bizweaver. Information regarding the associated File Operations and File Writer tools is found in separate documents. | ||
| - | ===== Special Note ===== | + | ====== File Reader Tool ====== |
| - | + | The **File Reader** tool is used to read data from “flat” delimited files and “structured” formats such as XML, JSON, Microsoft Excel. | |
| - | <WRAP center round important> | + | |
| - | Beginning in Bizweaver v2.0.170, two File Reader | + | |
| - | </ | + | |
| - | + | ||
| - | ====== FileReader | + | |
| - | The **File Reader** tool is used to read data from “flat” delimited files and “structured” formats such as XML, JSON, and Microsoft Excel. | + | |
| The File Reader tool is also used to process data being received from a webservice call. More information on this process can be found in the **// | The File Reader tool is also used to process data being received from a webservice call. More information on this process can be found in the **// | ||
| Line 43: | Line 35: | ||
| - Select the delimiter type from the drop-down list. \\ {{ : | - Select the delimiter type from the drop-down list. \\ {{ : | ||
| - | - If the “Custom Separated” delimiter | + | - If the “Custom Separated” delimiter |
| - | - The **File Reader** option | + | - The **FileReader2** tool requires a source file path & name or a Bizweaver variable that identifies the source file (alternatively you can use the output of the previous too - i.e. SQL or webservice). |
| - A specific file is a reasonable option if the source file name is always the same. | - A specific file is a reasonable option if the source file name is always the same. | ||
| - | - If the source file name may not always be the same, then the Get Files tool should be used to feed into a looping cycle where the FileReader tool is a step within the loop. | + | - If the source file name may not always be the same, then the File Operation |
| - | - **Wildcard file designations are not permitted for the file reader. Use the Get Files tool (File Operations) to process multiple files**. | + | - **Wildcard file designations are not permitted for the file reader. Use the File Operations |
| - See **// | - See **// | ||
| - | - The File Reader requires the use of a “template” file. This is simply an abbreviated version of the file to be processed. The template is used to define the expected columns when reading an input file. | + | - The File Reader requires the use of a “template” file. This is simply an abbreviated version of the file to be processed |
| - | - Best practice is to place the template files in their own folder, so they are not mixed with files to be processed. | + | - Best practice is to place the template files in their own folder |
| - The column structure and sample data from the template file are displayed in the area below the template file name. | - The column structure and sample data from the template file are displayed in the area below the template file name. | ||
| - Select the **No header row** option if the source files do not have a header row. | - Select the **No header row** option if the source files do not have a header row. | ||
| Line 61: | Line 53: | ||
| XML (e**X**tensible **M**arkup **L**anguage) and JSON (**J**ava**S**cript **O**bject **N**otation) are structured formats commonly used with websites. | XML (e**X**tensible **M**arkup **L**anguage) and JSON (**J**ava**S**cript **O**bject **N**otation) are structured formats commonly used with websites. | ||
| - | The setup for these formats is the same as described for delimited files, with one exception. When either of these formats is the source, the tool has additional functionality to deal with the hierarchy structures often found in these files. The tool “flattens” the data so that it can be used in subsequent processing. | + | The setup for these formats is the same as described for delimited files, with one exception; when either of these formats is the source, the tool has additional functionality to deal with the hierarchy structures often found in these files. The tool “flattens” the data so that it can be used in subsequent processing. |
| The sample used to explain handling these structures is JSON input returned from a web service call. The data being processed is freight carrier information. | The sample used to explain handling these structures is JSON input returned from a web service call. The data being processed is freight carrier information. | ||
| Line 88: | Line 80: | ||
| {{ : | {{ : | ||
| - | |||
| - | If the input structure is complex, you may need to use multiple FileReader steps (with a common input) to get all the data elements you need. | ||
| =====Specify Joining Character===== | =====Specify Joining Character===== | ||
| Line 135: | Line 125: | ||
| ====== Text String Files ====== | ====== Text String Files ====== | ||
| - | The Text Reader | + | The Text Reader |
| {{ : | {{ : | ||
| Line 142: | Line 132: | ||
| ====== Appendix A - File Operations Variables ====== | ====== Appendix A - File Operations Variables ====== | ||
| - | There are several variables from the File Operations | + | There are several variables from the File Operations |
| ^**Variable Name** | ^**Variable Name** | ||
| Line 155: | Line 145: | ||
| |Target File Name |“File” name as defined in a File Writer action | |Target File Name |“File” name as defined in a File Writer action | ||
| + | ---- | ||
| + | **[[bizweaver: | ||