Adding a create last value cache example

pull/6002/merge^2
meelahme 2025-04-18 13:59:52 -07:00
parent 0c85184b22
commit 4746e6ed2a
1 changed files with 26 additions and 1 deletions

View File

@ -38,4 +38,29 @@ You can use the following environment variables to set command options:
| `INFLUXDB3_DATABASE_NAME` | `--database` |
| `INFLUXDB3_AUTH_TOKEN` | `--token` |
<!-- TODO: GET EXAMPLES -->
## Examples
### Create a last value cache
{{% code-placeholders "(DATABASE|TABLE|CACHE)_NAME (TAG_COLUMN|FIELD_COLUMN)" %}}
<!--pytest.mark.skip-->
```bash
influxdb3 create last_cache \
--database DATABASE_NAME \
--table TABLE_NAME \
--tag-columns TAG_COLUMN \
--field-columns FIELD_COLUMN \
CACHE_NAME
```
{{% /code-placeholders %}}
In the example above, replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: Database name
- {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: Table name
- {{% code-placeholder-key %}}`TAG_COLUMN`{{% /code-placeholder-key %}}: Column to use as a tag key for the cache
- {{% code-placeholder-key %}}`FIELD_COLUM`N{{% /code-placeholder-key %}}: Column to cache the last value from
- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: Name for the new last value cache