Fabric JDBC connector implements a pure java, type 4 JDBC driver that executes SQL queries on Hyperledger fabric Blockchain.
APACHE-2.0 License
Fabric JDBC connector implements a pure java, type 4 JDBC driver that executes SQL queries on Hyperledger fabric blockchain. It facilitates getting the data in and out of fabric in JDBC compliant manner. The Fabric JDBC Connector can be used to perform ETL, BI reporting and analytics using the familiar SQL language.
It uses blkchn-sql-driver to parse the query and create corresponding logical plan. This logical plan is then converted into an optimized physical plan. The driver extends and implements the physical plan, using corresponding function calls of fabric-sdk-java to interact with Fabric network. The driver then converts the returned objects to a JDBC compliant result set and return it to the user.
Dependency | Version |
---|---|
maven | 3.3.3 |
java | 1.8 |
fabric-sdk-java | 1.1.0 |
spark | 2.0.2 |
git clone https://github.com/Impetus/blkchn-sql-driver.git
mvn clean install -Pgen-sources
git clone https://github.com/Impetus/fabric-jdbc-connector.git
mvn clean install
Fabric JDBC connector is a maven based project. It can be directly added as maven dependency in your project in the following manner :
<dependency>
<groupId>com.impetus.fabric</groupId>
<artifactId>fabric-jdbc-driver</artifactId>
<version>${fabricjdbcdriver.version}</version>
</dependency>
Build your project with the above changes to your pom.xml.
If you have run example code or integration test. It will create docker images, that need to clean manually. it consume approximately 100 MB of space upon running integration test once.
You need to run these command to free up space.
docker rm -v $(docker ps -a -q -f status=exited)
docker rmi -f `docker images|grep -i chncodefunc|awk '{ print $3 }'`
docker rmi -f `docker images|grep -i assettransfer|awk '{ print $3 }'`
docker rmi -f `docker images|grep -i sacc-1.0|awk '{ print $3 }'`
docker volume rm $(docker volume ls -qf dangling=true)
Fabric JDBC Connector is backed by Impetus Labs - iLabs. iLabs is a R&D consulting division of Impetus Technologies. iLabs focuses on innovations with next generation technologies and creates practice areas and new products around them. iLabs is actively involved working on blockchain technologies, neural networking, distributed/parallel computing and advanced analytics using spark and big data ecosystem. iLabs is also working on various other Open Source initiatives.