konikvranik / jdbc-influxdb

Apache License 2.0
7 stars 1 forks source link

= InfluxDB image:.resources/jdbc.png?[50,60] driver :release-version: 0.2.2 :uri-InfluxQL: https://docs.influxdata.com/influxdb/v1.7/query_language/data_exploration/ :uri-packages: https://github.com/konikvranik/jdbc-influxdb/packages/1650633?version={release-version} :project-uri: https://github.com/konikvranik/jdbc-influxdb :issues-uri: {project-uri}/issues/ :icons: font konikvranik hpa@suteren.net v{release-version}, 2022-09-27

Basic JDBC query functionality for the InfluxDB. + Intended to help developers and data analyst to inspect data over various GUI.

CAUTION: This driver does not provide full JDBC functionality and compatibility.

image:https://github.com/konikvranik/jdbc-influxdb/actions/workflows/gradle.yml/badge.svg[build]{nbsp}image:https://github.com/konikvranik/jdbc-influxdb/actions/workflows/codeql-analysis.yml/badge.svg[code QL]{nbsp}image:https://github.com/konikvranik/jdbc-influxdb/actions/workflows/gradle-publish.yml/badge.svg[release]https://codecov.io/gh/konikvranik/jdbc-influxdb[image:https://codecov.io/gh/konikvranik/jdbc-influxdb/graph/badge.svg?token=3L4CCNWETC[codecov]] + link:https://sonarcloud.io/summary/new_code?id=konikvranik_jdbc-influxdb[image:https://sonarcloud.io/api/project_badges/measure?project=konikvranik_jdbc-influxdb&metric=alert_status[Quality Gate Status]]link:https://sonarcloud.io/summary/new_code?id=konikvranik_jdbc-influxdb[image:https://sonarcloud.io/api/project_badges/measure?project=konikvranik_jdbc-influxdb&metric=security_rating[Security Rating]]link:https://sonarcloud.io/summary/new_code?id=konikvranik_jdbc-influxdb[image:https://sonarcloud.io/api/project_badges/measure?project=konikvranik_jdbc-influxdb&metric=sqale_rating[Maintainability Rating]]link:https://sonarcloud.io/summary/new_code?id=konikvranik_jdbc-influxdb[image:https://sonarcloud.io/api/project_badges/measure?project=konikvranik_jdbc-influxdb&metric=reliability_rating[Reliability Rating]]link:https://sonarcloud.io/summary/new_code?id=konikvranik_jdbc-influxdb[image:https://sonarcloud.io/api/project_badges/measure?project=konikvranik_jdbc-influxdb&metric=sqale_index[Technical Debt]]

link:https://central.sonatype.com/artifact/net.suteren.jdbc.influxdb/influxdb-jdbc[influxdb-jdbc artifact] is hosted on https://central.sonatype.com/[Maven Central]

[[supported]] == What is supported

This driver should provide basic query functionality for various IDEs and GUI DB clients. You can send {uri-InfluxQL}[InfluxQL] queries which are returned as sets of result sets.

It is capable to fetch all dababase (catalog) names, measurements (table), fields (column) and tags (column & index) from the metadata.

I tested it with IntelliJ Idea's DB support.

== What is not supported

== How to use it

Get the driver from the GitHub repo: {uri-packages}[influxdb-jdbc-{release-version}]

For <> and <> see related sections below.

JDBC URL is in the form of jdbc:influxdb:[http://][<USER>:<PASSWORD>]<HOST>[:<PORT>][?db=<DATABASE>].

Example: jdbc:influxdb:localhost:8086?db=telegraf

You can also pass database, username and password as driver properties:

[%header] |=== | Property | Description | username | login to the InfluxDB with this username | user | alias for username | password | login to the InfluxDB with this password | database | use this database after connecting | db | alias fo r database |===

[[gradle]] === Gradle

.build.gradle [source,groovy,subs="attributes,verbatim"]

repositories { maven { url = uri("https://maven.pkg.github.com/konikvranik/jdbc-influxdb") credentials { username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") } } }

dependencies { implementation 'net.suteren.jdbc.influxdb:influxdb-jdbc:{release-version}' }

[[maven]] === Maven

.settings.xml [source,xml]

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

github github central https://repo1.maven.org/maven2 github https://maven.pkg.github.com/konikvranik/jdbc-influxdb true github USERNAME TOKEN

.pom.xml [source,xml,subs="attributes,verbatim"]

net.suteren.jdbc.influxdb influxdb-jdbc {release-version}