alfresco-bulk-import
alfresco-bulk-import copied to clipboard
Support per-property multi-valued separator strings
Added code to allow for per-property separators, using a specialized property name like "separator:${propertyName}". This allows for more fine-grained control of the separator character to be used with each property included in the file for multi-valued attributes, which can facilitate faithful import/export of data.
The default behavior still persists if such special separator specifiers aren't included. Those specifier specifications are also excluded from being pulled in as properties.
Would you mind raising an issue that describes the problem this PR solves and linking the PR to it? It's hard for me to know whether to merge this without understanding what problem it solves.
Thanks!
This is about properties for which values may include a comma, but BI erroneously interprets the comma as a value separator. For instance, if the value set is [ "a,b,c", "d" ] then BI will erroneously parse that as [ "a", "b", "c", "d" ]. By allowing the use of an alternative separator, one can then encode files in such a way that BI can on-the-fly determine the correct way to separate out multiple values in a single property value string.
For instance one could then encode the above example as "a,b,c|d", and tell BI to use "|" as the separator, and thus not have data mangling.
Sometimes, one may not be able to use the same separator for all multivalued properties, hence the "separator" property is insufficient. Thus, per-property separators are the only solution. Another approach could be separator escaping (using '', for instance?), but that could require existing code that generates BI-compatible metadata to be modified.
Does this clarify?
@drivera73 it does, but it would be better to raise a bug report first, then link the PR to the bug.