Import From File – Example 2
Looking at the above example spreadsheet we see typical beer can related columns, with a single clear header row of column names "Name", "Brewery", "City", etc. However, even in this simple example there are potential issues importing into CanDB:
1.
The
Name column is actually a beer can's name plus a bit of text to describe the
can. To map this into CanDB we want to split the Name column into CanDB properties
of "Name" and "Short Text", delimiting the cell value based
on the "-" (dash character, but only if the "-" is
proceeded by a blank character).
2.
The
Condition column has both grade of the can and text description of the
condition. To map this into CanDB we want to split the Condition column into
CanDB properties of "Grade" and "Grade Text", delimiting
the cell value based on the "," (comma character, we don't care if
leading spaces or not).
3. The spreadsheet has explicit columns of City and State, but in CanDB this is a single property named "Location". We want to have CanDB consolidate these two column values into one string for CanDB storage. This is accomplished by an "=" character proceeding a list of column names.
To import this example the following Import From File configuration would be used. Notice the "Possible Chars" has removed the comma. If this were not removed, parsing of the Condition column would not split around the comma since no leading blank/space.