Starburst Neo4j connector#

The Neo4j connector allows users to query data in Neo4j databases.

Note

The Neo4j connector is a public preview in Starburst Enterprise. Contact Starburst Support with questions or feedback.

Requirements#

To use the Neo4j connector, you need:

  • Neo4j version 4.0 or higher.

  • Network access from the coordinator and workers to the Neo4j server. Port 7687 is the default port.

  • A valid Starburst Enterprise license.

Configuration#

Create a catalog properties file in etc/catalog named example.properties to access the configured Neo4j database in the example catalog (replace example with your database name or some other descriptive name of the catalog). Configure the usage of the connector by specifying the name neo4j and replace the connection properties as appropriate for your setup.

connector.name=neo4j
connection-url=jdbc:neo4j:bolt://example.net:7687/neo4j
connection-user=neo4j
connection-password=password

Type mapping#

Because Trino and Neo4j each support types that the other does not, this connector modifies some types when reading data. Data types may not map the same way between SEP and the data source. Refer to the following section for type mapping.

Neo4j to Trino type mapping#

The connector maps Neo4j types to the corresponding Trino types following this table:

Neo4j to Trino type mapping#

Neo4j type

Trino type

Notes

BOOLEAN

BOOLEAN

INTEGER

BIGINT

FLOAT

DOUBLE

NULL

VARCHAR

STRING

VARCHAR

DURATION

VARCHAR

DATE

DATE

LOCALTIME

TIME

TIME

TIME

LOCALDATETIME

TIMESTAMP

DATETIME

TIMESTAMP WITH TIMEZONE

OBJECT

VARCHAR

No other types are supported.

SQL support#

The connector provides read access to data and metadata in Neo4j. It supports globally available and read operation SQL statements.

Table functions#

The connector uses table functions to access Neo4j. SHOW SCHEMAS is not supported.

To perform a SELECT, provide a query using Cypher query language syntax. The Cypher query is transferred to Neo4j as a table function.

See the following example of a query using Cypher syntax:

SELECT * FROM TABLE(neo4j.system.query(query => 'MATCH (n:orders) return n.orderkey as orderkey,n.custkey as custkey,n.orderstatus as orderstatus,n.totalprice as totalprice,n.orderdate as orderdate,n.orderpriority as orderpriority,n.clerk as clerk,n.shippriority as shippriority,n.comment as comment'));

This query is equivalent to:

SELECT * FROM TABLE orders