Defining Output Data Schema

Describes how users define the output data schema

1. Add output schema file

In the MyOutputs folder in your solution, right-click and select "Add (D)" > "Add New Item (W)...". Select the OutputData item from the list of items, name it [schema name].cs and press the "Add (A)" button to add it. The example below shows the screen for adding an output schema named "SampleData".

2. Define output schema

Define column names and data types in the added output schema file. There is no limit to the number of columns you can define and you are free to add as many as you need. The example below defines two columns "COL_1", "COL_2" in String format.

using Nodez.Data.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nodez.Project.Template.MyOutputs
{
    public class SampleOutputData : IOutputRow
    {
        // Define columns here (NOTICE: The column name defined here and the column name defined in the data file must match.)

        public string COL_1 { get; set; }

        public string COL_2 { get; set; }

    }
}

By default, the filename of the output data schema is set to the name of the output .csv file. If you want to change the name of the output file, you must set the file name as a parameter when writing the file.

Last updated