Wiki

Scale Your Enterprise

User Tools

Site Tools


bw2:databuilder_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:databuilder_tool [2021/02/11 18:17]
akoehler [JSON Example]
bw2:databuilder_tool [2022/08/02 15:33] (current)
akoehler
Line 21: Line 21:
   - Input will generally be from a SQL Reader step.   - Input will generally be from a SQL Reader step.
   - The example used on this page is for JSON.  The same general process is also used for XML.   - The example used on this page is for JSON.  The same general process is also used for XML.
 +  - When working with decisions, the Databuilder tool in a branch of a decision will only reference Databuilder tools in that same branch.
  
 ====== General Process ====== ====== General Process ======
Line 63: Line 64:
  
 {{ :bw2:bizweaverdatabuilder4.png |}} {{ :bw2:bizweaverdatabuilder4.png |}}
 +
 +<WRAP center round tip 80%>
 +In most cases the lower-level sections will need to be marked as an **array**. The “Add as an array” checkbox should be selected. However, always check your API documentation to verify this.  **At the same time**, the "Top-level Element" checkbox should remain cleared.
 +</WRAP>
 +
 +<WRAP center round important 80%>
 +When creating lower-level section that __may__ have more than one entry (i.e. an array), be sure to put the DataBuilder tool within a **Loop**.  As each record is read from the input it is added to the bottom of the array being constructed.  Not using a loop will result in an incorrect data structure.
 +</WRAP>
  
   * Once the data is mapped add another loop to process all lines. This will be built as an array. The Create New Object is filled in as it is needed to identify the array.   * Once the data is mapped add another loop to process all lines. This will be built as an array. The Create New Object is filled in as it is needed to identify the array.
Line 75: Line 84:
  
 {{ :bw2:bizweaverdatabuilder7.png |}} {{ :bw2:bizweaverdatabuilder7.png |}}
 +
 +
 +====Databuilder Variables====
 +^Name         ^ Description         
 +|AddAsArry|True or False if the add as array checkbox is selected|
 +|CumulativeData|This is the collection of all data that was built in the databuilder|
 +|Data|This is the last run of data that was entered into the databuilder|
 +|DataSourceName|This indicates the name of the tool that is being used for the source data for the databuilder|
 +|DataType|This indicates the type of data your are building XML or JSON|
 +|ObjectName|Is the name of the top level of your JSON or XML|
 +|TopLevelElement|True or False if the top level element checkbox is selected|
 +| StepMessage|During a failure the reason for failure will be populated here |
 +| StepStatus        |True or False|
bw2/databuilder_tool.1613085424.txt.gz · Last modified: 2021/02/11 18:17 by akoehler