bw2:file_reader_tool

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
bw2:file_reader_tool [2023/07/13 17:04]
wgates [XML & JSON 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. Plain text can also be read with “text reader” as a single string.
-<WRAP center round important> +
-Beginning in Bizweaver v2.0.170, two File Reader tools are displayed: FileReader and FileReader2. The functions are the same in both tools except for handling XML and JSON files found in FileReader2. While workflows created using FileReader will continue to function, any new workflows should use FileReader2. All references to “FileReader” in this section refer to FileReader2. +
-</WRAP> +
- +
-====== FileReader Tool ====== +
-The **File Reader** tool is used to read data from “flat” delimited files and “structured” formats such as XML, JSON, and Microsoft Excel. There is also a special input type called “text reader.” Data read from the file is then available in subsequent processing steps.+
  
 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 **//[[bw2:web_service_tool|Webservice Tool]]//** page. 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 **//[[bw2:web_service_tool|Webservice Tool]]//** page.
Line 50: Line 42:
       - See **//[[bw2:file_reader_tool#appendix_a_-_file_operations_variables|Appendix A - File Operations Variables]]//** for definitions of the options available using step variables.       - See **//[[bw2:file_reader_tool#appendix_a_-_file_operations_variables|Appendix A - File Operations Variables]]//** for definitions of the options available using step variables.
   - The File Reader requires the use of a “template” file. This is simply an abbreviated version of the file to be processed (the template file can be the same file that is being processed but it's easier to debug a problem with a static file when and if the file structure changes). 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 (the template file can be the same file that is being processed but it's easier to debug a problem with a static file when and if the file structure changes). The template is used to define the expected columns when reading an input file.
-      - 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 (C:\ProgramData\Bizweaver\Templates), so they are not mixed with files to be processed.
       - 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 88: Line 80:
  
 {{ :bw2:bizweaverfilereader8.png |}} {{ :bw2:bizweaverfilereader8.png |}}
- 
-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.  Also note that you might see multiple parent objects for each child object selected, you'll need to filter these out.  If you introduce a new fileReader2 in a loop to parse another child object, you'll need to make sure you're only taking the correct objects because all are returned reqardless of outer-loop iteration. 
- 
-{{ :bw2:json_ordres.png |}} 
- 
-Loop through the JSON orders. 
- 
-{{ :bw2:json_orders_loop.png |}} 
- 
-Read the line_items 
- 
-{{ :bw2:json_orders_loop_line_items.png |}} 
- 
-You're now looping through every orders line items and must decide which line items to process. 
- 
-{{ :bw2:json_orders_loop_line_items_decision.png |}} 
  
 =====Specify Joining Character===== =====Specify Joining Character=====
Line 169: Line 145:
 |Target File Name      |“File” name as defined in a File Writer action    |Example: “*FileName.txt”    |  |Target File Name      |“File” name as defined in a File Writer action    |Example: “*FileName.txt”    | 
  
 +----
 +**[[bizweaver:Home|Home]]**
bw2/file_reader_tool.1689282241.txt.gz · Last modified: 2023/07/13 17:04 by wgates