About: This article introduces the Embed Data node, an Input node within Construct.
Location: Node panel
Table of Contents
Feature Overview
The Embed Data node is used to incorporate data directly into a job without needing to connect to an actual data source. Instead, users can include an Embed Data node to enter data directly in the job workspace. The node accepts data in a csv format and you manually enter the data, or paste it in.
For example, if a user wanted to include a reference table in their job, then they could use the Embed Data node to store that data directly within the job:
The most common use for this node is for quick testing. You can set up a single row of data to be run against a new function, for example. However, reference tables and any other data you may want to store in the job itself are also great use cases for this node.
Note: The larger the dataset, the larger your job file will become. This may cause some slowness when attempting to run the job, or even open it. Because of that, it is recommended that the data included in the Embed Data node not exceed 100 rows.
Formatting
The first row of values entered will be read as column headers. If your data does not already include column headers, you may want to add them. Every following row, separated by a carriage return or line feed, will be seen as a separate row of data. The individual columns need to be separated by commas.
The Embed Data node will guess at the data types of the columns, but if you would like to strictly apply a data type to a column you may do so by adding a data type parameter directly before the column name. Available data type parameters include; Integer, Real, Text, Date, Time, Datetime, and Boolean. For example you could enter something like this:
{Text}ID, Name, {Date}Birthdate, {Integer}Age
1, John, 01/01/01, 19
This would enforce that the columns be read in as that particular data type regardless of what values exist in the columns.
To include a comma in a text column the column must be double quoted.
Full Name, Birthdate
"Smith, John", 01/01/01
To include a double quote in a text column the value must be double quoted, and then double quoted once more to escape it.
Full Name, Birthdate
"John ""Danger"" Smith", 01/01/01
Comments
0 comments
Article is closed for comments.