{"id":33065256,"url":"https://github.com/influxcommunity/influxdb3-java","last_synced_at":"2026-06-11T08:00:41.528Z","repository":{"id":166779319,"uuid":"642285765","full_name":"InfluxCommunity/influxdb3-java","owner":"InfluxCommunity","description":"The Java Client that provides a simple and convenient way to interact with InfluxDB 3.","archived":false,"fork":false,"pushed_at":"2026-06-02T15:30:31.000Z","size":5195,"stargazers_count":39,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-06-02T17:12:50.781Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://InfluxCommunity.github.io/influxdb3-java/apidocs/com/influxdb/v3/client/package-summary.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InfluxCommunity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-18T08:22:03.000Z","updated_at":"2026-06-02T15:38:39.000Z","dependencies_parsed_at":"2024-05-14T04:30:33.559Z","dependency_job_id":"bf63fb82-909a-4475-9f12-c7c7456754bc","html_url":"https://github.com/InfluxCommunity/influxdb3-java","commit_stats":null,"previous_names":["bonitoo-io/influxdb3-java","influxcommunity/influxdb3-java"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/InfluxCommunity/influxdb3-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfluxCommunity%2Finfluxdb3-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfluxCommunity%2Finfluxdb3-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfluxCommunity%2Finfluxdb3-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfluxCommunity%2Finfluxdb3-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InfluxCommunity","download_url":"https://codeload.github.com/InfluxCommunity/influxdb3-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfluxCommunity%2Finfluxdb3-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34188272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-11-14T07:02:43.833Z","updated_at":"2026-06-11T08:00:41.516Z","avatar_url":"https://github.com/InfluxCommunity.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"duke_logo.png\" alt=\"Duke\" width=\"100px\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://repo1.maven.org/maven2/com/influxdb/influxdb3-java/\"\u003e\n        \u003cimg src=\"https://img.shields.io/maven-central/v/com.influxdb/influxdb3-java\" alt=\"Maven Central Badge\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://InfluxCommunity.github.io/influxdb3-java/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/maven-site-blue\" alt=\"Maven Site\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/InfluxCommunity/influxdb3-java/actions/workflows/codeql-analysis.yml\"\u003e\n        \u003cimg src=\"https://github.com/InfluxCommunity/influxdb3-java/actions/workflows/codeql-analysis.yml/badge.svg?branch=main\" alt=\"CodeQL analysis\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/InfluxCommunity/influxdb3-java/actions/workflows/linter.yml\"\u003e\n        \u003cimg src=\"https://github.com/InfluxCommunity/influxdb3-java/actions/workflows/linter.yml/badge.svg\" alt=\"Lint Code Base\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://dl.circleci.com/status-badge/redirect/gh/InfluxCommunity/influxdb3-java/tree/main\"\u003e\n        \u003cimg src=\"https://dl.circleci.com/status-badge/img/gh/InfluxCommunity/influxdb3-java/tree/main.svg?style=svg\" alt=\"CircleCI\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/InfluxCommunity/influxdb3-java\"\u003e\n        \u003cimg src=\"https://codecov.io/gh/InfluxCommunity/influxdb3-java/branch/main/graph/badge.svg\" alt=\"Code Cov\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://app.slack.com/huddle/TH8RGQX5Z/C02UDUPLQKA\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack\u0026style=social\" alt=\"Community Slack\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# InfluxDB 3 Java Client\n\nThe Java client that provides an easy and convenient way to interact with InfluxDB 3.\nThis package supports both writing data to InfluxDB and querying data using the FlightSQL client,\nwhich allows you to execute SQL queries against InfluxDB IOx.\n\nWe offer this [Getting Started: InfluxDB 3.0 Java Client Library](https://www.youtube.com/watch?v=EFnG7rUDvR4) video for learning more about the library.\n\n\u003e :warning: This client requires Java 11 and is compatible up to and including Java 25.\n\n## Installation\n\n\u003e :warning: Some JDK internals must be exposed by adding `--add-opens=java.base/java.nio=ALL-UNNAMED` to your JVM arguments.\n\nIf you are using JDK 25 or later, you also need to add `--sun-misc-unsafe-memory-access=allow`.\n\nAdd the latest version of the client to your project:\n\n### Maven dependency\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.influxdb\u003c/groupId\u003e\n    \u003cartifactId\u003einfluxdb3-java\u003c/artifactId\u003e\n    \u003cversion\u003e1.10.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Or when using Gradle\n\n```groovy\ndependencies {\n    implementation \"com.influxdb:influxdb3-java:1.10.0\"\n}\n```\n\n## Usage\n\n### Create client\n\nTo start with the client, import the `com.influxdb.v3.client` package and create a `InfluxDBClient` by:\n\n```java\npackage com.influxdb.v3;\n\nimport java.time.Instant;\nimport java.util.List;\nimport java.util.stream.Stream;\n\nimport com.influxdb.v3.client.InfluxDBClient;\nimport com.influxdb.v3.client.InfluxDBPartialWriteException;\nimport com.influxdb.v3.client.query.QueryOptions;\nimport com.influxdb.v3.client.Point;\nimport com.influxdb.v3.client.write.WriteOptions;\n\npublic class IOxExample {\n    public static void main(String[] args) throws Exception {\n        String host = \"https://us-east-1-1.aws.cloud2.influxdata.com\";\n        char[] token = \"my-token\".toCharArray();\n        String database = \"database\";\n\n        try (InfluxDBClient client = InfluxDBClient.getInstance(host, token, database)) {\n            // ...\n        }\n    }\n}\n```\n\n### Write\n\nTo insert data, you can use code like this:\n\n```java\n//\n// Write by Point\n//\nPoint point = Point.measurement(\"temperature\")\n        .setTag(\"location\", \"west\")\n        .setField(\"value\", 55.15)\n        .setTimestamp(Instant.now().minusSeconds(-10));\nclient.writePoint(point);\n\nWriteOptions orderedTagWrite = new WriteOptions.Builder()\n        .tagOrder(List.of(\"region\", \"host\"))\n        .build();\nclient.writePoint(\n        Point.measurement(\"temperature\")\n                .setTag(\"host\", \"server-1\")\n                .setTag(\"region\", \"eu-west\")\n                .setField(\"value\", 60.25),\n        orderedTagWrite\n);\n\n//\n// Write with partial acceptance (default behavior)\n//\nWriteOptions partialWrite = new WriteOptions.Builder().build();\ntry {\n    client.writeRecords(List.of(\n            \"temperature,region=west value=20.0\",\n            \"temperature,region=west value=\\\"bad\\\"\"\n    ), partialWrite);\n} catch (InfluxDBPartialWriteException e) {\n    // Inspect failed line details.\n    e.lineErrors().forEach(line -\u003e\n            System.out.printf(\"line=%s msg=%s lp=%s%n\", line.lineNumber(), line.errorMessage(), line.originalLine()));\n}\n\n//\n// Write via V2 API endpoint (InfluxDB Clustered and InfluxDB Cloud Dedicated/Serverless)\n//\nWriteOptions useV2 = new WriteOptions.Builder()\n        .useV2Api(true)\n        .build();\nclient.writeRecord(\"temperature,location=north value=60.0\", useV2);\n\n//\n// Write by LineProtocol\n//\nString record = \"temperature,location=north value=60.0\";\nclient.writeRecord(record);\n```\n\n#### Accept partial writes and inspect failed lines\n\nPartial writes are enabled by default when writing through the V3 API endpoint (`useV2Api=false`).\n`acceptPartial` can be configured in three ways: client defaults via `WriteOptions`, connection string / environment variable / system property (`writeAcceptPartial` / `INFLUX_WRITE_ACCEPT_PARTIAL` / `influx.writeAcceptPartial`), or per-write `WriteOptions`.\n\nSet `acceptPartial(false)` to disable partial writes.\nWith InfluxDB Core/Enterprise, when a write request fails due to one or more invalid lines, the error message starts with:\n\n- `partial write of line protocol occurred` when partial writes are enabled.\n- `parsing failed for write_lp endpoint` when partial writes are disabled.\n\nWhen partial writes are disabled, any rejected line causes all lines to be rejected.\nInfluxDB Clustered does not return this structured partial-write error format.\n\n#### Compatibility with InfluxDB Clustered and InfluxDB Cloud Dedicated/Serverless\n\nWrites use the V2 API endpoint by default.\nLike other write options, this can be configured in client code, connection string / environment variable / system property (`writeUseV2Api` / `INFLUX_WRITE_USE_V2_API` / `influx.writeUseV2Api`), or per-write `WriteOptions`.\n\n`noSync` requires the V3 API endpoint, which is available with InfluxDB 3 Core/Enterprise. `acceptPartial` applies only when writes are sent to the V3 API endpoint and is ignored when using the V2 API endpoint. To use `noSync`, set `useV2Api=false`.\nNote: when writes use the V2 API endpoint, `noSync=true` returns a validation error (`invalid write options: noSync requires useV2Api=false`).\n\n### Query\n\nTo query your data, you can use code like this:\n\n```java\n//\n// Query by SQL\n//\nSystem.out.printf(\"--------------------------------------------------------%n\");\nSystem.out.printf(\"| %-8s | %-8s | %-30s |%n\", \"location\", \"value\", \"time\");\nSystem.out.printf(\"--------------------------------------------------------%n\");\n\nString sql = \"select time,location,value from temperature order by time desc limit 10\";\ntry (Stream\u003cObject[]\u003e stream = client.query(sql)) {\n    stream.forEach(row -\u003e System.out.printf(\"| %-8s | %-8s | %-30s |%n\", row[1], row[2], row[0]));\n}\n\nSystem.out.printf(\"--------------------------------------------------------%n%n\");\n\n//\n// Query by parametrized SQL\n//\nSystem.out.printf(\"--------------------Parametrized SQL--------------------%n\");\nSystem.out.printf(\"| %-8s | %-8s | %-30s |%n\", \"location\", \"value\", \"time\");\nSystem.out.printf(\"--------------------------------------------------------%n\");\n\nString sqlParams = \"select time,location,value from temperature where location=$location order by time desc limit 10\";\ntry (Stream\u003cObject[]\u003e stream = client.query(sqlParams, Map.of(\"location\", \"north\"))) {\n    stream.forEach(row -\u003e System.out.printf(\"| %-8s | %-8s | %-30s |%n\", row[1], row[2], row[0]));\n}\n\nSystem.out.printf(\"--------------------------------------------------------%n%n\");\n\n//\n// Query by InfluxQL\n//\nSystem.out.printf(\"-----------------------------------------%n\");\nSystem.out.printf(\"| %-16s | %-18s |%n\", \"time\", \"mean\");\nSystem.out.printf(\"-----------------------------------------%n\");\n\nString influxQL = \"select MEAN(value) from temperature group by time(1d) fill(none) order by time desc limit 10\";\ntry (Stream\u003cObject[]\u003e stream = client.query(influxQL, QueryOptions.INFLUX_QL)) {\n    stream.forEach(row -\u003e System.out.printf(\"| %-16s | %-18s |%n\", row[1], row[2]));\n}\n\nSystem.out.printf(\"-----------------------------------------%n\");\n```\n\nor use `PointValues` structure with `client.queryPoints`:\n\n```java\nSystem.out.printf(\"--------------------------------------------------------%n\");\nSystem.out.printf(\"| %-8s | %-8s | %-30s |%n\", \"location\", \"value\", \"time\");\nSystem.out.printf(\"--------------------------------------------------------%n\");\n\n//\n// Query by SQL into Points\n//\nString sql1 = \"select time,location,value from temperature order by time desc limit 10\";\ntry (Stream\u003cPointValues\u003e stream = client.queryPoints(sql1, QueryOptions.DEFAULTS)) {\n    stream.forEach(\n        (PointValues p) -\u003e {\n            var time = p.getTimestamp();\n            var location = p.getTag(\"location\");\n            var value = p.getField(\"value\", Double.class);\n\n            System.out.printf(\"| %-8s | %-8s | %-30s |%n\", location, value, time);\n    });\n}\n\nSystem.out.printf(\"--------------------------------------------------------%n%n\");\n```\n\n## gRPC Compression\n\nThe Java client supports gRPC response compression.\n\nIf the server chooses to compress query responses (e.g., with gzip), the client\nwill automatically decompress them — no extra configuration is required.\n\n## Feedback\n\nIf you need help, please use our [Community Slack](https://app.slack.com/huddle/TH8RGQX5Z/C02UDUPLQKA)\nor [Community Page](https://community.influxdata.com/).\n\nNew features and bugs can be reported on GitHub: \u003chttps://github.com/InfluxCommunity/influxdb3-java\u003e\n\n## Contribution\n\nIf you would like to contribute code you can do through GitHub by forking the repository and sending a pull request into\nthe `main` branch.\n\n## License\n\nThe InfluxDB 3 Java Client is released under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfluxcommunity%2Finfluxdb3-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfluxcommunity%2Finfluxdb3-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfluxcommunity%2Finfluxdb3-java/lists"}