The CSV Writer node allows you to efficiently add data to an existing CSV file, either by appending new rows or updating specific columns, making it ideal for ongoing data management and structured data entry.

Node Inputs

  • CSV File Name

    • Type: File
    • Description: The CSV file where data will be written. Ensure the file is correctly specified for accurate data storage; the node can create a new CSV if one doesn’t already exist.
  • Writer Mode

    • Type: Enum (Optional)
    • Options:
      • Add New Row: Adds a complete new row at the end of the existing data in the CSV file.
      • Write to Column: Adds data to specific columns, starting from the last filled entry, to maintain data organization within the existing structure.
    • Note: If Writer Mode is not specified, the node defaults to adding a new row.

Node Output

  • Generated CSV File
    • Description: The modified CSV file after data has been added, ensuring easy access to the updated file.

Node Functionality

The CSV Writer node is designed for adding or updating data in a structured way within a CSV file. It can either append a new row to keep the data sequential or populate data directly into specified columns. This flexibility makes it suitable for systematic data updates without altering the integrity of the original data file.

When To Use

Use the CSV Writer node for scenarios where you need to continuously add or organize data within a CSV, such as:

  • Updating Reports: Append weekly or monthly metrics, like sales or inventory numbers, to an ongoing report.
  • Data Compilation: Collect pieces of information over time and compile them into a structured format, either as new rows or updated columns.
  • Batch Processing: For workflows that involve adding multiple data points at once, this node can handle batch processing efficiently.

Key Features

  • Automatic Header Recognition: Requires headers in the first row, which it uses to dynamically identify data columns.
  • Dynamic Data Input: Adapts input based on the CSV file’s structure, allowing you to work with specific columns as needed.
  • Batch Processing: Supports Loop Mode to handle multiple entries, making it ideal for workflows with repetitive data additions.

Important Notes

  1. Headers Required: The CSV file should have headers in the first row for optimal operation.
  2. Dynamic Inputs: The node dynamically adapts inputs based on the CSV headers, allowing for flexible data entry.
  3. Input Matching: Ensure data types of inputs match those in the CSV to prevent issues.
  4. Data Structure Integrity: Appends data without overwriting existing entries, maintaining data integrity.

The CSV Writer node is an essential tool for workflows that require frequent data additions or updates to CSV files, streamlining data management and improving organization.