-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Issue type: ❓ Question
(This issue is related to the PR #127 which will add the feature of populating external references from .env files)
I am currently facing the issue of the spec being not clear on a specific feature which is offered by the current version of the yarrrml-parser.
According to the parser documentation several YARRRML documents can be provided:
You can use multiple input files too: yarrrml-parser -i rules-1.yml -i rules-2.yml. They are converted to a single RML document. Note that the keys in prefixes, sources, and mappings have to be unique across all files
Furthermore the documentation says that
When you do not provide a value for an external reference, the reference will not be replaced.
However, how should a case be handled where conflicting external references exist in several provided YARRRML documents?
Partial solution via prioritization
As discussed internally, the prioritized order to replace external references should be
- Use provided reference values via the
-eargument - Use values provided via the
externalobject inside a YARRRML document - Use values provided via an
.envfile
Whereas this order specifies how to deal with possibly conflicting external references across command line, YARRRML document and environment (namely by following the provided prioritization), it does not specify how to deal with conflicting external references within each of these approaches.
For 1 and 3 the solution could look the following:
- Conflicting external references provided via arguments can be handled via an error message.
- Conflicting external references provided via environment variables will by definition have the value of the last assignment
However, how to resolve conflicts for 2, i.e. external references within the external block of different input YARRRML documents?