trino
trino copied to clipboard
[WIP] Neo4j connector
Description
Connector for the Neo4j graph database.
Additional context and related issues
See docs for connector overview.
Release notes
[ ] This is not user-visible or is docs only, and no release notes are required. [ ] Release notes are required. Please propose a release note for me. [x] Release notes are required, with the following suggested text:
# Neo4j connector
* New connector supporting the Neo4j graph database
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla
I'd appreciate an initial review of this. The connector is working as intended.
For tests I've mostly tried to cover the type mappings for the table function, which should cover all types, and the same for the node/relationship tables (although more test cases need to be added here).
What are your thoughts on implementing "dynamic tables", like the Pinot connector does?
It would be easy to support queries like:
select * from "match (a:Actor)-[c:ACTED_IN]-(m:Movie) return a, c, m";
ie. the table name is a CQL query.
This would be the similar to functionality provided by the system.query
table function that I have currently implemented.
Since Neo4j is dynamically typed there is no way to know the structure of the result.
For the table function the user can optionally provide a DESCRIPTOR
for typing the return result, if not, a generic JSON-result is returned (single column of type json
named result
).
For a dynamic table like the above, we could do the same, so the result would be:
result (json ) |
---|
{"a": {...}, "c": {...}, "m": {...}} |
That approach is now discouraged. We used it before we had support for table functions, but it's no longer necessary.
That approach is now discouraged. We used it before we had support for table functions, but it's no longer necessary.
Ok, thanks, then I'll stick to the table function.