Skip to main content

Create DataTable

Creates a new DataTable with specified columns. This is the starting point for building in-memory data structures for your automation workflows.

Common Properties​

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Input​

  • Columns - Array of column names for the new table (e.g., ["Name", "Age", "Email"])

Output​

  • Table - Newly created DataTable with the specified columns and no rows

Options​

  • Custom Columns - Define custom array of column names using the visual editor
    • Each entry represents a column name
    • Alternative to using the Columns input
    • Useful for defining static table structures

Example Usage​

Creating a Simple DataTable​

// Define columns as an array
var columns = ["Product", "Quantity", "Price"];

// Create DataTable node will output an empty table with these columns
// Output: table with 3 columns, 0 rows

Creating a Customer DataTable​

// Define customer data structure
var columns = ["CustomerID", "Name", "Email", "Phone", "City"];

// The created table is ready to receive customer data

Using Custom Columns Option​

Instead of passing an array through input, you can use the Custom Columns option to define columns directly in the node properties:

  1. Open the node properties
  2. Add column names one by one in the Custom Columns section
  3. No need to use the Columns input when Custom Columns are defined

Tips​

  • Column names should be unique and descriptive
  • Avoid special characters in column names for better compatibility
  • Plan your table structure before creating it - adding columns later requires additional nodes
  • Use meaningful column names that reflect your data domain
  • Created tables start empty - use Add Row node to populate data

Common Errors​

Empty Column Name Error​

Error: Column name cannot be empty. Please provide a valid column name.

Solution: Ensure all column names in the array or Custom Columns option have non-empty values.

// Wrong
var columns = ["Name", "", "Email"];

// Correct
var columns = ["Name", "Age", "Email"];

No Columns Provided Error​

Error: Columns cannot be empty. Please provide at least one column name.

Solution: Provide at least one column name either through the Columns input or Custom Columns option.

// Wrong
var columns = [];

// Correct
var columns = ["ID"];

See Also​

  • Add Row - Add data rows to the table
  • Add Column - Add new columns to an existing table
  • Get Row - Retrieve specific rows