About: This article introduces the Append node, a Compile node within Construct.
Location: Node panel
Table of Contents
Feature Overview
The Append node stacks records from two or more sources vertically to create one combined output. For example, if two datasets are appended, one containing 5,000 records and the other containing 10,000 records, the appended dataset will contain 15,000 records.
Configuring an Append Node
Append is intended to combine datasets with the same schema (more-or-less). The node looks for columns/variables with the same name and data type. When exact column matches are found, the columns from the different datasets are combined into one column and the records are stacked or appended to each other. However, exact matches are not mandatory for the node to work. The column names and data types can be changed within the node to rectify with columns from other sources. If there are columns that exist in some sources but not in others, the output will contain all columns that entered the node (whether they have matches or not) and the records will simply contain values only if they came from a source with that column, or will contain null otherwise.
Whether columns from several sources line up can be verified by reviewing the Is in Source check boxes. If a box is checked, then that source's data will appear under that column in the Append output. The key to which source is which appears at the bottom of the screen.
Changing Data Types
Users may change the data type of a column in an Append node. Select the desired cell in the Data Type column and select a different data type from the drop down menu.
Renaming Output Columns
Users may rename columns in an Append node. This allows data from two (or more) sources to rectify into one column, even when their source column names are different. To rename a column, right-click a column name and choose Rename or just double-click the column name, then type in the new name. Once entered, the Append will re-align with other fields of the same name.
Creating a Source ID Column
Checking the box Create Source ID Column creates a new variable called Source ID in the output file. It stores a value indicating which input the specific record came from. By default, the values will be integers from 1 to # (# of files being appended), however the values can be changed. This can be done by double-clicking on the value under the Source ID column and typing a new value. Users should also make sure to adjust the value Type (Integer or Text) correspondingly to the new value. The default column name is Source ID, however the column name can be changed by entering a new one in the Name field.
Video Tutorial
Related Articles
Comments
0 comments
Article is closed for comments.