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

Transformation function over joined sources? #1

Closed
dachafra opened this issue Mar 24, 2021 · 7 comments
Closed

Transformation function over joined sources? #1

dachafra opened this issue Mar 24, 2021 · 7 comments
Assignees
Labels
FnO issues related to the functions descriptions question Further information is requested RML-join issues relate to joins of RML

Comments

@dachafra
Copy link
Member

Having two sources (A and B) that can be joined by a field, would be possible to apply functions on some B fields and using them in any part of the TriplesMap from A?

Let me put an example.
Table A:

AC1 AC2
a a1
b b1

Table B

BC1 BC2
a1 "hello a"
b1 "hello b"

Output (applying uppercase to BC2)

<http://example.org/a> ex:predicate "HELLO A"^^xsd:string
<http://example.org/b> ex:predicate "HELLO B"^^xsd:string

I don't know if it is currently possible declaring the join-condition in the mapping rules or should we have to create an ad-hoc implemented function?

@dachafra dachafra added the question Further information is requested label Mar 24, 2021
@bjdmeest
Copy link
Member

bjdmeest commented Mar 24, 2021

I have the feeling these are two issues:

  • joining values of a second source as objects of a first source (which I don't think is currently feasible in RML?)
  • executing a function over a join result

Right now

For what you want, I think we need both (i) a function with a nested condition (in RML+FnO), and (ii) the ability to describe a join condition that does not return the subject of a triples map, but something else, maybe it returns the iteration from a different logical source that matches the condition, so that we could use a reference formulation to take any data field from that iteration (in RML) --> this is related to kg-construct/mapping-challenges#29

What I did:

WDYT?

@pmaria
Copy link
Collaborator

pmaria commented Mar 24, 2021

Isn't "joining values of a second source as objects of a first source" the same as the mapping challeng "join on literals"? At least, that's how I interpreted the latter.

I agree with the above. I also feel that it would be good to solve that issue in RML first, before deciding on how iterations in "function triples maps" should work. It might save us from making things overly complex.

@bjdmeest
Copy link
Member

bjdmeest commented Mar 24, 2021

Isn't "joining values of a second source as objects of a first source" the same as the mapping challeng "join on literals"? At least, that's how I interpreted the latter.

You're totally right, forgot that was already in there 😅

EDIT: I refined my comment above

@dachafra
Copy link
Member Author

Isn't "joining values of a second source as objects of a first source" the same as the mapping challenge "join on literals"? At least, that's how I interpreted the latter.

Totally agree with this too!

@pmaria
Copy link
Collaborator

pmaria commented Mar 24, 2021

Saved you hours of work there @bjdmeest 😂

@dachafra
Copy link
Member Author

@bjdmeest as this issue has been split into three new issues, where we are actually discussing all, shall we close this?

@bjdmeest
Copy link
Member

awesome, yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FnO issues related to the functions descriptions question Further information is requested RML-join issues relate to joins of RML
Projects
None yet
Development

No branches or pull requests

4 participants