Skip to main content

Columns & Target Data Model Column

Depending on your system requirements, you need to receive data in a specific structure. This structure can be defined within the nuvo importer by specifying the columns array, where each column needs to contain at least a label and a key value. Moreover, you can add a description or example value to provide your users more information for each column. You can add abbreviations and synonyms of the column to the alternativeMatches array to help our mapping algorithm. You could add validation rules by setting up regular expressions, column-cross dependencies, column types (very similar to data types) and/or add a required- as well as an unique-tag. Adding additional column options enables the received data to be transferred into your system with minimal or no further processing.

info

Our mapping algorithm considers the key, the label and the alternativeMatches for estimating the similarity between imported and target columns.

The label value specifies how a particular column is displayed to the user within the frontend. The key value determines the column name on the technical level. This means that each JSON object from the result array object contains a property with the columns' key.

For example, if you want the following JSON structure with customer_code, customer_name, domain_name, region, deal_size, address, deal_stage & pipeline as properties as the importer's output...

[
{
"customer_code": "2345678954",
"customer_name": "Nuvo GmbH",
"domain_name": "getnuvo.com",
"address": "Schoeneberger Allee 6",
"region": "Hamburg, Germany",
"deal_size": "10,000 - 25,000€",
"deal_stage": "Follow Up",
"pipeline": "Pipeline Nr.1"
},
{
"customer_code": "2345678955",
"customer_name": "ComDocks Ltd.",
"domain_name": "www.comdocks.com",
"address": "Suedring 28",
"region": "Berlin, Germany",
"deal_size": "25,000 - 50,000€",
"deal_stage": "Lead",
"pipeline": "Pipeline Nr.2"
},
{
"customer_code": "2345678956",
"customer_name": "Nuvo GmbH",
"domain_name": "getnuvo.com",
"address": "Garden Street 12",
"region": "New York, US",
"deal_size": "<10,000€",
"deal_stage": "Follow Up",
"pipeline": "Pipeline Nr.1"
},
{
"customer_code": "2345678957",
"customer_name": "Nuvo GmbH",
"domain_name": "getnuvo.com",
"address": "Ueberseebruecke 9",
"region": "Hamburg, Germany",
"deal_size": "25,000 - 50,000€",
"deal_stage": "Closed",
"pipeline": "Pipeline Nr.3"
},
{
"customer_code": "2345678958",
"customer_name": "Nuvo GmbH",
"domain_name": "getnuvo.com",
"address": "Baker Street 62",
"region": "Manchester, UK",
"deal_size": "10,000 - 25,000€",
"deal_stage": "Closed",
"pipeline": "Pipeline Nr.2"
}
]

...you would define the target data model as follows:

columns: [
{
label: "Customer Code",
key: "customer_code",
},
{
label: "Customer Name",
key: "customer_name",
},
{
label: "Domain Name",
key: "domain_name",
},
{
label: "Region",
key: "region",
},
{
label: "Deal Size",
key: "deal_size",
},
{
label: "Address",
key: "address",
},
{
label: "Deal Stage",
key: "deal_stage",
},
{
label: "Pipeline",
key: "pipeline",
},
];

After setting up the general structure of your target data model, we recommend you to add more validation rules so that you can ensure that the user-submitted data is not only in the correct schema but also the values are in the preferred format. We suggest adding extra information to each column, especially to the columns which need more explanation, with the description and the example property to increase the user experience and help the user to be able to complete the import process as fast as possible.

info

Suppose you already know your preferred output structure and have a CSV, XLS or XLSX file containing the column names. In that case, you can generate the target data model within the "Setup"-Tab inside our user platform. For this, follow the instructions of step 3. Furthermore, you can use our no code tool within our user platform (Target data model generator).

info

Please note that the target data model can also be generated dynamically. This enables you to show each user a different and personalised schema. For example, if you want to generate a user-specific target schema based on the already existing data inside your database of each user. For this, you would fetch data from your backend, transform the fetched data into a readable JSON structure (for the nuvo importer) and insert it into our component before it is initialised. If you have questions regarding this procedure or require a code snippet, contact us via [email protected].


The column class includes several properties with which you can add additional explanation or information for your user, add validations rules as well as data types, and they can also be used to support our mapping algorithm. In the following, all properties of the column class are displayed, including its default value, data type and description.


label (required)

Typestring
Descriptionlabel is one of two required properties of a column object. The value is displayed within the frontend to the user, who goes through the importing workflow. This value and the key value is used for the column matching.

key (required)

Typestring
DescriptionThe value of key defines how your application calls a column. This value is not displayed to your users but is like label used to match this target data model column to the imported columns.

description

Typestring
DescriptionWhen defined, an info icon will be displayed right next to the column's name inside of the "Match Columns"- and "Review Entries"-Step. If the user hovers over it, a popover info with the defined string is displayed. Therefore enabling this option, gives you the possibility to clearly communicate the meaning of the column to the user.

example

Typestring
DescriptionThe example option allows you to define an example property for each column within the columns array. The value of it is displayed within the table of the data cleaning step.
info

This option can only be used when enableExamples is set to true within the settings object.


alternativeMatches

Type[ string, ... ]
Descriptionnuvo utilizes machine learning with a logic-based component to provide an intelligent and advanced mapping functionality inside the “Match Columns”-Step. To be able to force a more precise matching, we offer an additional matching layer with the alternativeMatches property. This should help match the target and imported columns more accurately because every item of the alternativeMatches array is considered for calculating the similarity between imported and target model columns. We recommend adding abbreviations and synonyms here.

validations (required)

Type[ ValidationObject, ... ]
DescriptionWith the validations option, you can define the preferred format of your columns and their values. You can also add individualised error messages to show your users what they can do better. Each object of the validations array, can contain up to five key:
  • validate
  • errorMessage
  • regex
  • columns
  • columnValues

validate:

Typestring
DescriptionWith this option, you can use one of our pre-built validation rules such as required, unique, regex and many more. This property offers you the possibility to ensure the highest-possible data quality.

errorMessage

Typestring
DescriptionWith this option, you can add an fully customized error message to one of the validation rules above. This notification text overwrittes the pre-built error message.

regex

Typestring
DescriptionThis option contains the regular expression which should be applied to all cells of the column using this validation rule. The value of this property is only required, if validate equals regex within the ValidationObject. The regular expression needs to be JSON-escaped. For more information, visit our regex documentation.

columns

Type[string, ...]
required for all column-cross validation rules
DescriptionThis array contains all columns that need to be checked against the column using this validation rule. It is only required when you use validate with required_with, required_without, required_with_all and required_without_all. In the following example, it is displayed how to use required with. The same syntax can also be used with required_without, required_with_all and required_without_all.

columnsValues

Type{columnName: [string, ...], ...}
required for all value-based validation rules
DescriptionThis object has a key related to the column name of the column you want to select and the value you want to validate against as the value. It is only required when you use validate with required_with_values, required_without_values, required_with_all_values or required_without_all_values. In the following example, it is displayed how to use required_with_values. This same syntax can also be used with required_without_values, required_with_all_values and required_without_all_values.

Validation rules:

Default validation rules:

  1. validate: "unique" - This function makes sure that no duplicates can be entered within a column. Every cell that contains a duplicated value is highlighted as an error. Please note that the first appearance of the repeated value is not marked as an error.
columns: [
{
...
validations: [{ validate: "unique" }],
...
}
]
  1. validate: "required" - This option ensures that the column is filled and throws an error for the user to notify.
columns: [
{
...
validations: [{ validate: "required" }],
...
}
]
  1. validate: "regex" - This option enables you to add your preferred regular expression that you want to validate against. Please note that this regular expression must be JSON escaped and a string. For further information, how to use regular expressions within the nuvo importer checkout our regex documentation.
columns: [
{
...
validations: [
{
validate: "regex",
regex: "^https\\:\\/\\/([A-Za-z0-9]+)\\.([A-Za-z]{1,3})$"
},
]
...
}
]

Column-cross validation rules:

  1. validate: "required_with" - In case any cells within the same entry/row of the columns defined in the columns array are filled, the column cells should not be empty.
  2. validate: "required_without" - In case any cells within the same entry/row of the columns defined in the columns array are left empty the column cells should contain a value.
  3. validate: "required_with_all" - In case all cells within the same row of the columns defined in the columns array are filled the column cells should contain a value.
  4. validate: "required_without_all" - In case all cells within the same row of the columns defined in the columns array are empty the column cells should contain a value.
columns: [
{
label: "Region",
key: "region",
validations: [
{
validate: "required_with",
columns: ["address"],
},
],
},
{
label: "Address",
key: "address",
},
];

Value-based validation rules:

  1. validate: "required_with_values" - In case at least one cell within the same row of the columns defined in the columns array is filled and has a particular value - determined within the columnValues property - the column cells should contain a value and not be empty.
  2. validate: "required_without_values" - In case at least one cells within the same row of the columns defined in the columns array are present and do not have the specific value determined within the `columnValues property the column cells should contain a value.
  3. validate: "required_with_all_values" - In case all cells within the same row of the columns defined in the columns array are filled and have the specific value determined within the columnValues property the column cells should contain a value and not be empty only.
  4. validate: "required_without_all_values" - In case all cells within the same row of the columns defined in the columns array are filled and do not have a particular value determined within the columnValues property the column cells should contain a value.
columns: [
{
label: "Deal Stage",
key: "deal_stage",
},
{
label: "Deal Size",
key: "deal_size",
validations: [
{
validate: "required_with_values",
columnValues: {
deal_stage: ["Closed"],
},
},
],
},
];

columnType

Type"category", "boolean", "int", "float" or "string"
Optional
DescriptionThis option allows you to define the type of the column. You can either choose if the column should contain values which are a category, a boolean, an int, a float or a string. When category or booleanis chosen, the cells of those columns are displayed as dropdowns. The dropdown options for the category column can be provided within the dropdownOptions property.

Type[ DropdownOptionsObject, ... ]
Required whencolumnType: "category"
DescriptionEach object of this array is a dropdown option that contains two required and two optinal keys. The required keys are label and value and the two optional keys are type & alternativeMatches. This array must be defined when the columnType of the associated column equals category.
  • label (required) - This value is displayed to the user who is guided through the importing workflow.
  • value (required) - This key is similar to the key prop of a column object. It defines how your application calls a dropdown option and it is not displayed to your users.
  • type - This option allows you to define the type of a dropdown option. You can choose if a dropdown option value is saved as int, float or string inside the result array object.
  • alternativeMatches - The alternativeMatches option allows you to define one or more alternative matches for a dropdown option. The alternativeMatches values are also matched against the imported values like the key and the value of the dropdown option. This should help match more dropdown options automatically and increase the matching probability.
info

If you use TypeScript, you must define type for each dropdown option object.

In the following, you can find an example of how to implement it:

columns: [
{
label: "Storage Type",
key: "storage_type",
validations: [
{
validate: "required",
},
],
columnType: "category",
dropdownOptions: [
{
label: "dry",
value: "dry",
type: "string",
},
{
label: "fresh",
value: "fresh",
type: "string",
},
{
label: "frozen",
value: "frozen",
type: "string",
},
],
},
];