About: This article introduces the Output node, an Output type node within Construct.
Location: Node panel
Table of Contents
Feature Overview
The Output node provides a means of saving data to a file extract or a database table outside of Construct. Users can create new files/tables, or append the current data onto existing files/tables.
Note: Only one data source can enter the Output node at a time. The Report node allows for multiple sources to be output in a single document.
Outputting to a File Extract
The required parameters of the Output node depend on the selected Output Type. The required fields relate to the location and name of the file the user is creating. Use the ellipsis [...] to browse to a folder location on your machine for the file to be saved in. Then specify the file name in the file browser window. Or type the full file path and name into the Full File Name input.
When outputting to an Excel file, two additional parameters are required: Workbook file and Worksheet. These fields will simply name the file and the specific sheet within the file. A default value of "Sheet1" can be used for the Worksheet. The dropdown arrows on these fields can be used to select pre-existing Workbooks or Worksheets if the Folder value points to a location where other excel files already exist.
Once the parameters have been established, click the Test button to test the output configuration, then Save.
Note: Within this node is the ability to use a parameter and/or a timestamp within the file name. Adding a parameter to the workbook or worksheet names will include the dynamic value of the parameter that can be specified in the Edit Parameters toolbar. Adding a timestamp will append the date and time to the file name that the file was created.
Outputting to a Database Table
When outputting to a database, the required fields relate to the user credentials and database information. The example below are the fields needed to create a new SQL table, however the required parameters may differ slightly depending on the specific database Output Type selected.
Note: When writing to a database table, make sure you configure your settings to "Allow Create Table in Database." This settings is found in the top toolbar drop down menu Tools > Options > General.
Once an Output configuration has been saved, users can still edit the output location (if necessary), as well as remove columns from the output file (using the check boxes), and reorder the columns (using the back up and down arrows).
Tip: To avoid overwriting an output file each time a job is run, Output nodes can be temporarily disabled. This prevents the Output from running during a job run. See this article for more information on disabling nodes.
Dynamic File Naming
Several nodes, including the Output node, allow for the incorporation of one or more parameters or Time/Date stamps into the file name.
Parameters
Parameters (i.e. named variables) are user-defined, specific to each job and configured under the Edit Parameters button of the Job Toolbar.
To add a parameter to a file name, configure the Output node for the type of file, file location, and file name. Then place the cursor at that position in the file name where the parameter value should be added. Finally, use the green "P" parameter icon to view and select from the list of available job parameters. Once selected, the file name will appear containing the name of the parameter surrounded in curly brackets. When the job is run and the file is created, the parameter name is replaced with parameter’s value.
Timestamp
To add a timestamp to a file name, configure the Output node for the type of file, file location, and file name. Then place the cursor at that position in the file name where the timestamp value should be added. Finally, use the clock icon to the right of the File Name field to view and select from the list of time and date formatting options. Once selected, the file name will appear containing the time or date format surrounded in curly brackets. When the job is run and the file is created, the formatting code is replaced with the corresponding date and/or time of the file's creation.
Comments
0 comments
Article is closed for comments.