Wiki

Scale Your Enterprise

User Tools

Site Tools


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/12 13:32]
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. 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 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:
  
 {{ :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. 
  
 =====Specify Joining Character===== =====Specify Joining Character=====
Line 135: Line 125:
 ====== Text String Files ====== ====== Text String Files ======
  
-The Text Reader option is used when the input file needs to be read as a single string of text. The uses for this option are very specialized and limited.+The Text Reader file type is used when the input file needs to be read as a single string of text. The uses for this option are very specialized and limited.
  
 {{ :bw2:bizweaverfilereader9.png |}} {{ :bw2:bizweaverfilereader9.png |}}
Line 142: Line 132:
 ====== Appendix A - File Operations Variables ====== ====== Appendix A - File Operations Variables ======
  
-There are several variables from the File Operations function that can be used in other workflow steps. In the following examples, the file being addressed is named “FileName.txt” and it is found in the folder “C:\SourceFolder”.+There are several variables from the File Operations tool that can be used in other workflow tools. In the following examples, the file being addressed is named “FileName.txt” and it is found in the folder “C:\SourceFolder”.
  
 ^**Variable Name**     ^**Explanation**                                   ^**Example**                  ^**Variable Name**     ^**Explanation**                                   ^**Example**                 
Line 155: 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.1689183136.txt.gz · Last modified: 2023/07/12 13:32 by wgates