Skip to content
This repository has been archived by the owner on Sep 25, 2022. It is now read-only.

Support per-property multi-valued separator strings #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drivera73
Copy link

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.

…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.
@pmonks
Copy link
Owner

pmonks commented Nov 18, 2016

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!

@drivera73
Copy link
Author

drivera73 commented Jan 2, 2018

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?

@pmonks
Copy link
Owner

pmonks commented Jan 2, 2018

@drivera73 it does, but it would be better to raise a bug report first, then link the PR to the bug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants