Skip to content

Handling of conflicting external references from different YARRRML documents? #131

@SvenLieber

Description

@SvenLieber

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

  1. Use provided reference values via the -e argument
  2. Use values provided via the external object inside a YARRRML document
  3. Use values provided via an .env file

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions