Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions databases/index.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Supported Databases
description: All 43 engines TablePro connects to, their default ports, and which ones need a plugin
description: All 44 engines TablePro connects to, their default ports, and which ones need a plugin
---

import DriverCounts from "/snippets/driver-counts.mdx";

Forty-three engines, and every one of them is free to use. What differs between them is where the
Forty-four engines, and every one of them is free to use. What differs between them is where the
driver comes from, not what the license covers.

<DriverCounts />
Expand All @@ -31,6 +31,7 @@ driver comes from, not what the license covers.
| [etcd](/databases/etcd) | 2379 | Plugin |
| [Firebase Realtime Database](/databases/firebase) | API-based | Plugin |
| [Firestore](/databases/firebase) | API-based | Plugin |
| [InfluxDB](/databases/influxdb) | 8086 | Plugin |
| [KingbaseES](/databases/kingbasees) | 54321 | Plugin |
| [libSQL](/databases/libsql) | API-based | Plugin |
| [Kafka](/databases/kafka) | 9092 | Plugin |
Expand Down
111 changes: 111 additions & 0 deletions databases/influxdb.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: InfluxDB
description: Connect to InfluxDB 2 or 3, browse measurements, and run SQL, InfluxQL or Flux
---

import RegistryPlugin from "/snippets/registry-plugin.mdx";

Databases (buckets on 2.x) are the containers, measurements are tables, and each point is a row with `time` first. The editor runs the languages the server accepts: SQL and InfluxQL on 3.x, Flux and InfluxQL on 2.x.

<RegistryPlugin name="InfluxDB" plugin="InfluxDB Driver" />

## Quick setup

Click **New Connection…**, select **InfluxDB**, enter host, port and token, then click **Save & Connect**.

For a server on a private network, open the **Network** tab and set **Connect via** to **SSH Tunnel**, then set **Host** to the address InfluxDB listens on as the SSH server sees it, usually `localhost`. See [SSH Tunneling](/connections/ssh-tunneling).

## Connection settings

| Field | Description |
|-------|-------------|
| **Host** | Server hostname. `localhost` for Docker |
| **Port** | `8086` by default, the 2.x port. InfluxDB 3 Core and Enterprise listen on `8181` |
| **Token** | An API token. Leave it empty for a 3.x server started with `--without-auth` |
| **Database** | The database (3.x) or bucket (2.x) the sidebar opens. Switch it later from the database list |
| **Organization** | 2.x only. Optional when the token sees one organization |
| **Skip TLS Verification** | Options tab. Trusts any certificate, even under **Verify CA** or **Verify Identity** |

TablePro reads the server version from `/ping` when it connects, and picks the API from it: `/api/v3` on 3.x, `/api/v2` and the v1 `/query` endpoint on 2.x. A wrong token fails the connection instead of the first query: 3.x checks it on `/ping`, and on 2.x TablePro lists one bucket with it. A 1.x server is refused at connect.

## Browsing measurements

The sidebar lists databases or buckets, and the measurements in the one that is open. `_internal`, `_monitoring` and `_tasks` show as system databases.

Columns come back with `time` first and the rest by name. Each has a type: `timestamp` for `time`, `tag` for a tag, and the field type (`float`, `integer`, `unsigned`, `string`, `boolean`) for a field.

A page opens newest first. Timestamps show as RFC 3339 text in UTC, such as `2024-10-27T03:34:20Z`, not as nanosecond integers.

On 3.x the grid runs SQL and sorts by any column. On 2.x it runs InfluxQL, which sorts by `time` only, so a sort on another column keeps the time order.

## Filtering

| Operators | 3.x SQL | 2.x InfluxQL |
|----------|---------|--------------|
| equals, not equals, greater than, less than and the rest | `=`, `!=`, `>`, `<` | Same |
| contains, not contains, starts with, ends with, REGEX | `~` and `!~` with an escaped pattern | `=~` and `!~` with a `/regex/` |
| in list, not in list | `IN`, `NOT IN` | `=` joined by `OR`, `!=` joined by `AND` |
| between | Two inclusive bounds | Same |
| is NULL, is not NULL | `IS NULL`, `IS NOT NULL` | `= ''` and `!= ''` on a tag. InfluxQL has no null test for a field |

A filter on `time` takes an RFC 3339 timestamp. A tag value is always text, so `host = 1` matches the tag `"1"`.

A filter the language cannot run on that column, such as a null test on a 2.x field or a regex on a number, shows an error instead of an empty grid.

## Query editor

Type a statement and run it. The language is chosen from the text:

| Server | What runs |
|--------|-----------|
| 3.x | SQL. A `SHOW MEASUREMENTS`, `SHOW TAG KEYS` or `SHOW FIELD KEYS`, a `GROUP BY time(...)` or a duration such as `now() - 1h` runs as InfluxQL |
| 2.x | InfluxQL. A script with a `\|>` pipe, or one starting with `from(`, `import` or `buckets(`, runs as Flux |

To choose the language yourself, make the first line a comment naming it, such as `-- influxql`, `-- sql` or `// flux`. Either comment style works for any language, and TablePro removes the line before sending the statement. A language the server does not accept reports which ones it does.

Run InfluxQL one statement at a time. 2.x runs every statement it receives, so an InfluxQL statement with a `;` anywhere but at its end is refused, even inside a value or a comment.

```sql
SELECT date_bin(INTERVAL '5 minutes', time) AS bucket, avg(usage)
FROM cpu
WHERE time >= now() - INTERVAL '1 hour'
GROUP BY bucket
ORDER BY bucket
```

A Flux result arrives as one table per series. The grid shows them as one, with the columns of every table, so a `pivot()` reads as one row per timestamp.

## Safe Mode and read-only connections

A Flux script reads when every package it imports only reads, such as `strings`, `date`, `array`, `csv` or `influxdata/influxdb/schema`, and it never names `to()` or `wideTo()`. Any other package, such as `http`, `sql`, `experimental/influxdb` or a notification package, counts as a write that reaches outside the database. A `host:` argument, which reads another server, and a `file:` argument, which reads the server's disk, count as reaching outside without writing. Before running a Flux script, TablePro has the 2.x server parse it and refuses one the server reads as writing or reaching outside where TablePro's own check did not. SQL and InfluxQL are read like any SQL: `SELECT ... INTO` writes, `DROP MEASUREMENT` destroys data.

## SSL/TLS

New connections start on **Disabled**, plain HTTP. Every other mode goes over HTTPS. **Preferred** and **Required (skip verify)** accept a self-signed certificate. See [SSL/TLS](/connections/ssl).

## Limitations

- The grid is read-only. Points are written with line protocol, which TablePro does not send.
- InfluxDB 1.x is not supported.
- On 3.x an empty string field and a missing field both show as NULL: the CSV format the driver reads writes them the same way.
- There are no views, routines, foreign keys or schema edits.
- The plugin is registry-only. It is not on iPhone or iPad.

## Troubleshooting

### InfluxDB refused the token

The token is wrong, expired, or has no read access to the database or bucket. On 3.x with auth on, even `/ping` needs the token.

### InfluxDB 2 needs an organization

The token sees more than one organization. Set **Organization** to the one that owns the bucket.

### Flux is not available on this server

The server is 3.x, which has no Flux. Write the query in SQL or InfluxQL.

## Related

- [Import & Export](/features/import-export)
- [Filtering](/features/filtering)
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@
"databases/firebase",
"databases/bigquery",
"databases/bigtable",
"databases/influxdb",
"databases/kafka",
"databases/kingbasees",
"databases/libsql",
Expand Down
2 changes: 1 addition & 1 deletion index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Introduction
description: Native macOS database client for MySQL, PostgreSQL, SQLite, MongoDB, Redis, and 38 more
description: Native macOS database client for MySQL, PostgreSQL, SQLite, MongoDB, Redis, and 39 more
---

import DriverCounts from "/snippets/driver-counts.mdx";
Expand Down
4 changes: 2 additions & 2 deletions snippets/driver-counts.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Five drivers ship inside the app and cover twelve databases. Twenty-seven registry plugins cover the
other thirty-one and install on the first connection that needs one. See
Five drivers ship inside the app and cover twelve databases. Twenty-eight registry plugins cover the
other thirty-two and install on the first connection that needs one. See
[Plugins](/features/plugins).
Loading