Sometimes data arrives in a format that does not naturally lend itself to an import. Importacular includes functionality to split names into their constituent parts but what happens if you have other data separated by commas.


Let's take the example of nationality. This is a field that comes in from our iSAMs data source but could come from anywhere. We want to add this as an attribute. Users can select multiple nationalities and they will come into Importacular, for example, as one of the following:



Chinese (if they only select one nationality)

Chinese, Canadian

Canadian, Chinese


Each attribute mapping refers to one entry in RE. This means that if a user has selected a nationality of "Chinese,Canadian", and there is only one attribute mapping set up in Importacular then only one attribute will be added irrespective of whether or not they have selected two nationalities in the field.


To get around this we use data transformations to look at the nationality field to see whether there is just a single value, whether there is a value that ends with a comma or whether there is a value that starts with a comma.


In order to create an attribute for each separate nationality you need to set up another attribute mapping to capture the second nationality. Both mappings will need to have data transformations. However if we simply copy the same mapping twice, with the same transformations, Importacular will simply make the first transformation it finds and create the same value twice.


The way to solve this is to have three separate attribute mappings:


  • One attribute mapping that captures all the nationalities that are the first of the pair as a partial match i.e. that have a comma after them e.g. "Chinese," 
  • One attribute mapping that captures the second value in the pair as a partial match with the comma before e.g. ",Chinese". 
  • One additional attribute mapping that captures the nationality as an exact match with no comma. This will catch all the single nationalities. And on this attribute you should also create a catch-all as blank, then any outliers will not be created so that you won't get duplicates and you wont get repeated values.

Note that if there is not a dual nationality entry, then the attribute will not be created without a description. Importacular should never create 3 attributes. At most two (where the value is "nationality 1, nationality 2) and only one attribute (where the value is simply "nationality 1").