Defining Input Data Schema
Describes how users define the input data schema
Last updated
Describes how users define the input data schema
Last updated
In the MyInputs folder in your solution, right-click and select "Add (D)" > "Add New Item (W)...". Select the InputData 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 input schema named "SampleData".
Define column names and data types in the added input 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" of type String.
The column names defined in the input schema file must match the column names defined in the input data file. We recommend that you also define the data type for each column defined in the input schema file to match what is defined in the input data file.
You can add KeyMappings as needed to look up data through defined keys. KeyMappings can be added through the constructor of the schema file. The example code below creates a KeyMappings with "COL_1" as the Key and another with "COL1" and "COL_2" as the Key. KeyMappings are Dictionary structures with Int as a key, and you can access each KeyMapping through the Key of the KeyMappings. You can see how to retrieve data through KeyMappings .