Column Types
For each column of a target data model, you can define a columnType
to determine which format or - in some cases - which data type the output is supposed to have. By default, the columntType
equals string
. If you want a different data type for the output data, you can set the key to either int
, float
and many more.
Apart from defining the data type, all the options mentioned above and the other options contain pre-built data validations to ensure that the user-submitted data is in the correct format. An error message is shown if the imported data does not fit the column type's validation rule.
On this page, you will find a collection of all available options for the columnType
prop, along with examples of valid input data and the corresponding output format.
To use the column types, you must define the columnType
property of a column within the target data model.
Example
[
{
label: "Product ID",
key: "product_id",
columnType: "string",
},
{
label: "EAN",
key: "ean_gtin",
columnType: "gtin",
},
{
label: "Price",
key: "price",
columnType: "float",
},
{
label: "Manufacturing Date",
key: "man_date",
columnType: "date",
outputFormat: "MM/DD/YYYY",
},
];
List of column types
Text (default)
Type | "string" |
Description | The cells in this column are displayed as free text fields. The output has the data type string . string is the default columnType if no columnType is defined. |
Input example | "Hello World", "Nuvo GmbH" or "20095 Hamburg" |
Output format
[
{
company_name: "nuvo GmbH",
},
];
Integer number (int)
Type | "int" |
Description | The cells in this column are displayed as free text fields that display an error message if the input is not numerical or a decimal number. The output has the data type int . The display of the value is controlled by the property numberFormat . |
Input example | "1", "20", "318", "1.000" or "1,000" |
Output format
[
{
counter: 100,
},
];
Decimal number (float)
Type | "float" |
Description | The cells in this column are displayed as free text fields that display an error message if the input is not numerical. The output has the data type float . The display of the value is controlled by the property numberFormat . |
Input example | "1", "20,2", "318,4", "10.000,25" or "10,000.25" |
Output format
[
{
price: 10.22,
},
];
Bank Identifier Code (BIC)
Type | "bic" |
Description | The cells in this column are displayed as free text fields that display an error message if the input does not match the bank identifier code format (spaces are not allowed). |
Input example | "SOBKDEBBXXX", "GENODEF1SFD" or "NTSBDEB1XXX" |
Output format
[
{
client_bic: "GENODEF1SFD",
},
];