All Projects → neo4j-contrib → neo4j-jdbc

neo4j-contrib / neo4j-jdbc

Licence: Apache-2.0 license
JDBC driver for Neo4j

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to neo4j-jdbc

Neo4j Tableau
Neo4j Tableau Integration via WDC
Stars: ✭ 56 (-49.09%)
Mutual labels:  integration, neo4j, business-intelligence
neo4j-java-driver-spring-boot-starter
Automatic configuration of Neo4j's Java Driver for Spring Boot applications
Stars: ✭ 33 (-70%)
Mutual labels:  neo4j, driver, neo4j-driver
Dataform
Dataform is a framework for managing SQL based data operations in BigQuery, Snowflake, and Redshift
Stars: ✭ 342 (+210.91%)
Mutual labels:  etl, business-intelligence
Ananas Desktop
A hackable data integration & analysis tool to enable non technical users to edit data processing jobs and visualise data on demand.
Stars: ✭ 551 (+400.91%)
Mutual labels:  etl, business-intelligence
angular-neo4j
Neo4j Bolt driver wrapper for Angular
Stars: ✭ 18 (-83.64%)
Mutual labels:  neo4j, neo4j-driver
BETL-old
BETL. Meta data driven ETL generation using T-SQL
Stars: ✭ 17 (-84.55%)
Mutual labels:  etl, business-intelligence
dogETL
A lib to transform data from jdbc,csv,json to ecah other.
Stars: ✭ 15 (-86.36%)
Mutual labels:  etl, jdbc
Etl.net
Mass processing data with a complete ETL for .net developers
Stars: ✭ 129 (+17.27%)
Mutual labels:  etl, business-intelligence
Libneo4j Client
neo4j-client -- Neo4j Command Line Interface (CLI)
Stars: ✭ 121 (+10%)
Mutual labels:  neo4j, driver
naas
⚙️ Schedule notebooks, run them like APIs, expose securely your assets: Jupyter as a viable ⚡️ Production environment
Stars: ✭ 219 (+99.09%)
Mutual labels:  integration, etl
Airbyte
Airbyte is an open-source EL(T) platform that helps you replicate your data in your warehouses, lakes and databases.
Stars: ✭ 4,919 (+4371.82%)
Mutual labels:  integration, etl
Neo4j Java Driver
Neo4j Bolt driver for Java
Stars: ✭ 241 (+119.09%)
Mutual labels:  neo4j, driver
Helicalinsight
Helical Insight software is world’s first Open Source Business Intelligence framework which helps you to make sense out of your data and make well informed decisions.
Stars: ✭ 214 (+94.55%)
Mutual labels:  neo4j, business-intelligence
mydataharbor
🇨🇳 MyDataHarbor是一个致力于解决任意数据源到任意数据源的分布式、高扩展性、高性能、事务级的数据同步中间件。帮助用户可靠、快速、稳定的对海量数据进行准实时增量同步或者定时全量同步,主要定位是为实时交易系统服务,亦可用于大数据的数据同步(ETL领域)。
Stars: ✭ 28 (-74.55%)
Mutual labels:  etl, jdbc
Bolt sips
Neo4j driver for Elixir
Stars: ✭ 204 (+85.45%)
Mutual labels:  neo4j, driver
Awesome Business Intelligence
Actively curated list of awesome BI tools. PRs welcome!
Stars: ✭ 1,157 (+951.82%)
Mutual labels:  etl, business-intelligence
NBi
NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Access. The main goal of this framework is to let users create tests with a declarative approach based on an Xml syntax. By the means of NBi, you don't need to develop C# or Java code to specify your tests! Either, you don't need Visual Studio or Eclipse to compile y…
Stars: ✭ 102 (-7.27%)
Mutual labels:  etl, business-intelligence
Neo4j sips
Elixir driver for the Neo4j graph database server
Stars: ✭ 78 (-29.09%)
Mutual labels:  neo4j, driver
Neo4j Core
A simple unified API that can access both the server and embedded Neo4j database. Used by the neo4j gem
Stars: ✭ 99 (-10%)
Mutual labels:  neo4j, driver
Reddit Detective
Play detective on Reddit: Discover political disinformation campaigns, secret influencers and more
Stars: ✭ 129 (+17.27%)
Mutual labels:  etl, neo4j

Overview: Neo4j JDBC Driver

CI

You can find the full documentation at: http://neo4j-contrib.github.io/neo4j-jdbc/

This is a JDBC driver for Neo4j supporting Cypher over JDBC.

This driver was mainly developed by Larus BA, Italy, a certified consulting and integration solutions partner for Neo4j. Thank you so much for all your work.

Being a graph database, Neo4j is not serving data in a relational way, nevertheless thanks to this driver it’s possible for projects that are using the classic JDBC connector in the relational paradigm to interact with Neo4j.

This driver supports various types of database transports, through:

  • The Bolt direct connection protocol using jdbc:neo4j:bolt://<host>:<port>/ from Neo4j 3.0+

  • The Bolt routing-aware protocol for clusters:

    • using jdbc:neo4j:neo4j://<host>:<port>/ from Neo4j 4.0+

    • using jdbc:neo4j:bolt+routing://<host>:<port>/ from Neo4j 3.1+ to 3.5.x

You can also specify the encryption via the Bolt URI scheme (starting with the JDBC driver 4.0.3):

  • jdbc:neo4j:bolt://<host>:<port>/

  • jdbc:neo4j:bolt+s://<host>:<port>/

  • jdbc:neo4j:bolt+ssc://<host>:<port>/

  • jdbc:neo4j:neo4j://<host>:<port>/

  • jdbc:neo4j:neo4j+s://<host>:<port>/

  • jdbc:neo4j:neo4j+ssc://<host>:<port>/

See the official Neo4j Java driver documentation to learn more.

Note
The previous JDBC driver for Neo4j 2.x was moved to the https://github.com/neo4j-contrib/neo4j-jdbc-2x repository.
Table 1. Versions compatibility
Neo4j-JDBC Neo4j version Neo4j Driver Java URI Schemes Temporal and Spatial

3.5.2

3.5.x

1.7.5

1.8

http, bolt, bolt+routing

yes

4.0.5

3.5.x - 4.x

4.4.x

1.8

http, bolt, neo4j

yes

5.0.0

4.4 - 5

5.0.0

17

bolt, neo4j

yes

Maven dependency

Simply add the JDBC dependency:

<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-jdbc-bolt</artifactId>
    <version>{neo4j-jdbc-version}</version>
    <scope>runtime</scope>
</dependency>

Minimum viable snippet

Dependency declaration
org.neo4j:neo4j-jdbc-bolt:5.0.0
Run Query
// Connecting
try (Connection connection = DriverManager.getConnection("jdbc:neo4j:bolt://localhost", "neo4j", password);
    // Querying
     PreparedStatement stmt = connection.prepareStatement("MATCH (u:User)-[:FRIEND]-(f:User) WHERE u.name = $0 RETURN f.name, f.age")) {

    stmt.setString(0, "John");

    try (ResultSet rs = stmt.executeQuery()) {
        while (rs.next()) {
            System.out.println("Friend: "+rs.getString("f.name")+" is "+rs.getInt("f.age"));
        }
    }
}

Please note that the example above uses the try-with-resource blocks that automatically closes resources when the try block is exited.

Usage with Neo4j Server

  • Install a Neo4j 5.x/4.x server and start it with the Bolt protocol enabled

  • Connect with URLs in the following 3 forms:

    • jdbc:neo4j:http://<host>:<port>/ (e.g. jdbc:neo4j:http://localhost/)

    • jdbc:neo4j:bolt://<host>:<port>/ (e.g. jdbc:neo4j:bolt://localhost/)

    • jdbc:neo4j:neo4j://<host>:<port>/ (e.g. jdbc:neo4j:bolt+routing://localhost?routing:policy=eu)

  • You can also use additional parameters in the URL separated by an & character for authentication, debug mode, SSL encryption and flattening e.g. jdbc:neo4j:bolt://localhost/?user=neo4j&password=xxxx&debug=true&nossl&flatten=[-1,100,1000]

Note
We’ve deprecated the usage of , as the parameter separator in favour of & to be compliant with the URL parameter syntax.
  • Add the JDBC driver dependency or jar file to your project

  • Get a connection from DriverManager

  • Execute queries and transactions using the Cypher graph query language

List of Supported Neo4j Configuration parameters

Property Name Supported Values Description

trust.strategy

TRUST_ALL_CERTIFICATES, TRUST_CUSTOM_CA_SIGNED_CERTIFICATES, TRUST_SYSTEM_CA_SIGNED_CERTIFICATES

The supported trusted strategies

trusted.certificate.file

File Path

The path of the certificate file

connection.acquisition.timeout

Any Long

The acquisition time

connection.liveness.check.timeout

Any Long

The liveness check timeout

connection.timeout

Any Long

The connection timeout

encryption

true/false

Activate the application encryption

leaked.sessions.logging

true/false

If log leaked session

max.connection.lifetime

Any Long

The connection lifetime

max.connection.poolsize

Any Int

The max pool size

max.transaction.retry.time

Any Long

The retry time for a transaction transient error

database

String

The database name, if not specified connects to the default instance

readonly

true/false

If specified creates a fixed read only connection, any further modification via the Connection#setReadOnly method will have no effect

autocommit

true/false

If specified sets the autocommit property as initial value, you can still change the autocommit value by using Connection#setAutoCommit method, but it will have effect only for newly created transactions

usebookmarks

true/false

If specified disables the bookmarks

Flattening

As most JDBC clients and tools don’t support complex objects, the driver can flatten returned nodes and relationships by providing all their properties as individual columns with names like u.name,r.since if you just return a node u or relationship r.

This is enabled with the JDBC-URL parameter flatten=<rows>, where <rows> indicates how many rows are sampled to determine those columns. With -1 all rows are sampled and with any other value you determine the number of rows being looked at.

Tomcat

When the JDBC driver is configured as a JNDI resource into Tomcat, you must include these two arguments on Resource configuration:

  • removeAbandonedOnBorrow="true"

  • closeMethod="close"

Here’s an example:

    <Resource name="jdbc/neo4j"
              auth="Container"
              type="javax.sql.DataSource"
              username="neo4j"
              password="password"
              driverClassName="org.neo4j.jdbc.bolt.BoltDriver"
              url="jdbc:neo4j:bolt://localhost"
              removeAbandonedOnBorrow="true"
              closeMethod="close"
              />

Building the driver yourself

First clone the repository.

This project is composed by the following modules:

Run all unit tests & integration tests
mvn clean test
Run only integration tests
mvn clean test -Pintegration-test
Run performance tests
mvn clean test -Pperformance-test
Note
To run the performance test, you must have a Neo4j Server running with the Bolt protocol enabled on port 7687 (default).

License

Copyright (c) Neo4j and LARUS Business Automation

The "Neo4j JDBC Driver" is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.

Feedback

Please provide feedback and report bugs as GitHub issues or join the neo4j-users Slack and ask on the #neo4j-jdbc channel. You might also ask on StackOverflow, please tag your question there with neo4j and jdbc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].