Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iteration and reference 'identifiers' #43

Open
bjdmeest opened this issue Feb 9, 2023 · 1 comment
Open

Iteration and reference 'identifiers' #43

bjdmeest opened this issue Feb 9, 2023 · 1 comment

Comments

@bjdmeest
Copy link
Member

bjdmeest commented Feb 9, 2023

Do we need to access iteration and reference identifiers from within the RML mapping?

(distancing this from #6, as they can be about different things)

Use cases:

CSVW has a similar approach: https://w3c.github.io/csvw/metadata/#uri-template-properties

@bjdmeest
Copy link
Member Author

bjdmeest commented Feb 9, 2023

copied over from (#6 (comment)) to make this thread more self-standing

Additional use case in favor of 'iteration identifiers': being able to get the 'accessing' reference formulation per reference is needed at RMLio/yarrrml-parser#184.

So, I can imagine for CSV, per iteration you need to be able to identify that iteration (in this case, the row index would be enough), and per reference you need to identify that reference formulation (in this case, the combination row index / column index would be enough).

So a CSV file like below

lastname firstname
De Meester Ben
Chaves David

Could have a CSV iteration like below

firstname
David

Could actually have following references (relying on https://w3c.github.io/csvw/metadata/#uri-template-properties)

_sourceRow firstname firstname_sourceColumn
2 David 1

For JSONPath, you could include the actual used path for each iteration and reference
e.g. iteration $.persons[*] with reference * would give, for the first iteration, identifier $.persons[0] and reference identifiers lastname and firstname.

It won't create the most elegant mappings, but gives a lot of context for users to hack stuff together

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

No branches or pull requests

1 participant