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

Clarification and Documentation Request on Cross-Model Queries #463

Open
stone-ts15 opened this issue Nov 27, 2023 · 2 comments
Open

Clarification and Documentation Request on Cross-Model Queries #463

stone-ts15 opened this issue Nov 27, 2023 · 2 comments
Labels
A-docs C-enhancement Category: An issue proposing an enhancement

Comments

@stone-ts15
Copy link

Affected Areas

DB

Feature Description

Hello Polypheny Team,

I'm currently exploring the capabilities of Polypheny and am interested in executing cross-model queries, specifically between HSQLDB and Neo4j. However, I've encountered some difficulties as the documentation (Polypheny-documentation) does not clearly indicate whether this feature is supported. It would be immensely helpful if you could confirm whether Polypheny supports cross-model queries and possibly update the documentation to include examples or use cases showcasing this functionality.

Any clarification or assistance with this matter would be greatly appreciated. Thank you for your attention to this issue.

Use Case(s)

To illustrate my point, here's an example scenario involving a cross-model query between HSQLDB and Neo4j:

In Neo4j, with the namespace university, we have graph vertices labeled Student and edges labeled Friend created as follows:

CREATE (n: Student {deptno: 10});
CREATE (m: Student {deptno: 20});
MATCH (n: Student {deptno: 10}), (m: Student {deptno: 20}) CREATE (n)-[r:Friend]-(m);

Additionally, there is a predefined table named depts in the public namespace with a deptno column as its primary key. The query requirement (Q for short) is to find friends of students from the "Sales" department.

The Polypheny Web UI restricts users to one query language—either SQL or Cypher in this case. Therefore, it's unclear how to integrate the two models to satisfy Q. While attempting to write the Cypher query under the university namespace, all my queries failed to execute. For instance, the following statement triggered an org.polypheny.db.languages.NodeParseException:

MATCH (d: public.depts), (n: Student)-[r: Friend]-(m: Student)
WHERE d.name = 'Sales'
  AND d.deptno = n.deptno
RETURN m;

The error persists regardless of whether public.depts is quoted. It seems that the public.depts namespace is not recognized within the Cypher environment. When I replace public.depts with just depts, the query executes but returns an empty result set. Perhaps Polypheny considers depts as a individual vertex label in Neo4j.

Possible Solutions

No response

Possible Alternatives

No response

@stone-ts15 stone-ts15 added the C-enhancement Category: An issue proposing an enhancement label Nov 27, 2023
@hennlo
Copy link
Member

hennlo commented Nov 27, 2023

Hi @stone-sgy thanks for your interest in Polypheny.
Yes indeed I can confirm that we support Cross-Model Queries, this is one of our major goals to provide a semntical layer to enable cross-model queries across your data landscape and even execute queries regardless of the underlying query(e.g. SQL on Docuemnts-Store and vice-versa, etc.).

You've identified the use case and the approach correctly.
However, their is currently a major bug we are working on internally in a seperate refactoring branch, that we try having available within the following week.
This is also the reason why we temporarily needed to remove the documentation for this part.

I'll update you if the updates are "live".

@stone-ts15
Copy link
Author

@hennlo Thank you for your reply. Look forward to your update!

@hennlo hennlo added the A-docs label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs C-enhancement Category: An issue proposing an enhancement
Projects
None yet
Development

No branches or pull requests

2 participants