-
Notifications
You must be signed in to change notification settings - Fork 0
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
multiple join conditions between mappings during response lifting #11
Comments
could this be related to the multiple join condition support I saw in one of the issues in RML repo, @ThibaultGerrier? |
Hey Umut, I understand the problem, since the items do not have any unique field, there is nothing to join.
e.g. In your case you could then be using: So join whenever the path of the current element is the same as the path of the parent of the element from the subTripOrigin mapping are the same. (you can also simply use it like However in this project there is a bug in the conversion of yarrrml+ (which allows this
(same for destination) BTW you are missing some semi colons in the last 3 mappings: |
very cool, thanks! this PATH~ is something you invented or is it part of jsonpath+ ? I know there is the ~ operator for getting the property names but have not seen any PATH~ syntax. |
It's something I invented. jsonpath doesn't have such a feature, so i added it. It is also available for xml and csv mappings. In xml it also returns the path to the current node, while in csv it returns the line number. Xpath does have a built-in feature to return the path ( |
Hi Thibault,
I have an issue with joining three objects.
There are trips, their legs (subtrips), origin and destination for each leg. Here is the mapping file and input:
Here is the input file:
Here is the result. Pay attention that there are double entries for origin and destination
of each subtrip.
The problem here is that the subtriporigin and subtripdestination mappings are joined with subtrip, but not with the trip mapping so for each trip there is an origin and destination in each subtrip. This happens because the idx value of a leg is only unique within a trip and there is no other property that can serve as a primary key. Is there a way to solve this? I was thinking about adding a second join condition like idx, ^^^^idx, basically joining the trip idx reached from each origin and destination. Would that work with the current implementation?
The text was updated successfully, but these errors were encountered: