document show retention policies InfluxQL statement (#5474)
parent
d3d2c834cd
commit
2ace7c5f7d
|
|
@ -272,6 +272,7 @@ statement = explain_stmt |
|
|||
select_stmt |
|
||||
show_field_keys_stmt |
|
||||
show_measurements_stmt |
|
||||
show_retention_policies_stmt |
|
||||
show_tag_keys_stmt |
|
||||
show_tag_values_with_key = stmt .
|
||||
```
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ The following table provides information about what metaqueries are available in
|
|||
| Metaquery | Supported |
|
||||
| :------------------------------------------------------------ | :----------------------: |
|
||||
| <span style="opacity: .5;">SHOW DATABASES</span> | |
|
||||
| **SHOW RETENTION POLICIES** | **{{< icon "check" >}}** |
|
||||
| **SHOW MEASUREMENTS** | **{{< icon "check" >}}** |
|
||||
| <span style="opacity: .5;">SHOW SERIES</span> | |
|
||||
| <span style="opacity: .5;">SHOW SERIES CARDINALITY</span> | |
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ menu:
|
|||
weight: 207
|
||||
list_code_example: |
|
||||
```sql
|
||||
SHOW [MEASUREMENTS | FIELD KEYS | TAG KEYS | TAG VALUES]
|
||||
SHOW [RETENTION POLICIES | MEASUREMENTS | FIELD KEYS | TAG KEYS | TAG VALUES]
|
||||
```
|
||||
related:
|
||||
- /influxdb/cloud-dedicated/query-data/influxql/explore-schema/
|
||||
|
|
@ -18,11 +18,44 @@ related:
|
|||
|
||||
Use InfluxQL `SHOW` statements to query schema information from a database.
|
||||
|
||||
- [SHOW RETENTION POLICIES](#show-retention-policies)
|
||||
- [SHOW MEASUREMENTS](#show-measurements)
|
||||
- [SHOW FIELD KEYS](#show-field-keys)
|
||||
- [SHOW TAG KEYS](#show-tag-keys)
|
||||
- [SHOW TAG VALUES](#show-tag-values)
|
||||
|
||||
## SHOW RETENTION POLICIES
|
||||
|
||||
Use the `SHOW RETENTION POLICIES` statement to list retention policies associated
|
||||
with a database.
|
||||
Each database has a single retention policy--`autogen`.
|
||||
|
||||
{{% note %}}
|
||||
In {{< product-name >}}, retention policies are not part of the
|
||||
data structure but are expected by InfluxQL and used in fully-qualified measurements
|
||||
in the [`FROM` clause](/influxdb/cloud-dedicated/reference/influxql/select/#from-clause).
|
||||
The data returned for each retention policy does not represent the actual
|
||||
retention-related attributes of the database. The values are placeholder values
|
||||
meant only for InfluxQL feature parity.
|
||||
|
||||
For information about database data retention, see
|
||||
[List databases](/influxdb/cloud-dedicated/admin/databases/list/).
|
||||
{{% /note %}}
|
||||
|
||||
```sql
|
||||
SHOW RETENTION POLICIES [ON <database-name>]
|
||||
```
|
||||
|
||||
#### Examples
|
||||
|
||||
```sql
|
||||
-- Show retention policies in the database specified in the query request
|
||||
SHOW RETENTION POLICIES
|
||||
|
||||
-- Show retention policies in a specific database
|
||||
SHOW RETENTION POLICIES ON "example-database"
|
||||
```
|
||||
|
||||
## SHOW MEASUREMENTS
|
||||
|
||||
Use the `SHOW MEASUREMENTS` statement to list measurements in a database.
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@ statement = explain_stmt |
|
|||
select_stmt |
|
||||
show_field_keys_stmt |
|
||||
show_measurements_stmt |
|
||||
show_retention_policies_stmt |
|
||||
show_tag_keys_stmt |
|
||||
show_tag_values_with_key = stmt .
|
||||
```
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ The following table provides information about what metaqueries are available in
|
|||
| Metaquery | Supported |
|
||||
| :------------------------------------------------------------ | :----------------------: |
|
||||
| <span style="opacity: .5;">SHOW DATABASES</span> | |
|
||||
| **SHOW RETENTION POLICIES** | **{{< icon "check" >}}** |
|
||||
| **SHOW MEASUREMENTS** | **{{< icon "check" >}}** |
|
||||
| <span style="opacity: .5;">SHOW SERIES</span> | |
|
||||
| <span style="opacity: .5;">SHOW SERIES CARDINALITY</span> | |
|
||||
|
|
|
|||
|
|
@ -10,19 +10,52 @@ menu:
|
|||
weight: 207
|
||||
list_code_example: |
|
||||
```sql
|
||||
SHOW [MEASUREMENTS | FIELD KEYS | TAG KEYS | TAG VALUES]
|
||||
SHOW [RETENTION POLICIES | MEASUREMENTS | FIELD KEYS | TAG KEYS | TAG VALUES]
|
||||
```
|
||||
related:
|
||||
- /influxdb/cloud-serverless/query-data/influxql/explore-schema/
|
||||
---
|
||||
|
||||
Use InfluxQL `SHOW` statements to query schema information from a bucket.
|
||||
Use InfluxQL `SHOW` statements to query schema information from a database.
|
||||
|
||||
- [SHOW RETENTION POLICIES](#show-retention-policies)
|
||||
- [SHOW MEASUREMENTS](#show-measurements)
|
||||
- [SHOW FIELD KEYS](#show-field-keys)
|
||||
- [SHOW TAG KEYS](#show-tag-keys)
|
||||
- [SHOW TAG VALUES](#show-tag-values)
|
||||
|
||||
## SHOW RETENTION POLICIES
|
||||
|
||||
Use the `SHOW RETENTION POLICIES` statement to list retention policies associated
|
||||
with a database.
|
||||
Each database has a single retention policy--`autogen`.
|
||||
|
||||
{{% note %}}
|
||||
In {{< product-name >}}, retention policies are not part of the
|
||||
data structure but are expected by InfluxQL and used in fully-qualified measurements
|
||||
in the [`FROM` clause](/influxdb/cloud-serverless/reference/influxql/select/#from-clause).
|
||||
The data returned for each retention policy does not represent the actual
|
||||
retention-related attributes of the database. The values are placeholder values
|
||||
meant only for InfluxQL feature parity.
|
||||
|
||||
For information about database data retention, see
|
||||
[List databases](/influxdb/cloud-serverless/admin/databases/list/).
|
||||
{{% /note %}}
|
||||
|
||||
```sql
|
||||
SHOW RETENTION POLICIES [ON <database-name>]
|
||||
```
|
||||
|
||||
#### Examples
|
||||
|
||||
```sql
|
||||
-- Show retention policies in the database specified in the query request
|
||||
SHOW RETENTION POLICIES
|
||||
|
||||
-- Show retention policies in a specific database
|
||||
SHOW RETENTION POLICIES ON "example-database"
|
||||
```
|
||||
|
||||
## SHOW MEASUREMENTS
|
||||
|
||||
Use the `SHOW MEASUREMENTS` statement to list measurements in a bucket.
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@ statement = explain_stmt |
|
|||
select_stmt |
|
||||
show_field_keys_stmt |
|
||||
show_measurements_stmt |
|
||||
show_retention_policies_stmt |
|
||||
show_tag_keys_stmt |
|
||||
show_tag_values_with_key = stmt .
|
||||
```
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ The following table provides information about what metaqueries are available in
|
|||
| Metaquery | Supported |
|
||||
| :------------------------------------------------------------ | :----------------------: |
|
||||
| <span style="opacity: .5;">SHOW DATABASES</span> | |
|
||||
| **SHOW RETENTION POLICIES** | **{{< icon "check" >}}** |
|
||||
| **SHOW MEASUREMENTS** | **{{< icon "check" >}}** |
|
||||
| <span style="opacity: .5;">SHOW SERIES</span> | |
|
||||
| <span style="opacity: .5;">SHOW SERIES CARDINALITY</span> | |
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ menu:
|
|||
weight: 207
|
||||
list_code_example: |
|
||||
```sql
|
||||
SHOW [MEASUREMENTS | FIELD KEYS | TAG KEYS | TAG VALUES]
|
||||
SHOW [RETENTION POLICIES | MEASUREMENTS | FIELD KEYS | TAG KEYS | TAG VALUES]
|
||||
```
|
||||
related:
|
||||
- /influxdb/clustered/query-data/influxql/explore-schema/
|
||||
|
|
@ -18,11 +18,44 @@ related:
|
|||
|
||||
Use InfluxQL `SHOW` statements to query schema information from a database.
|
||||
|
||||
- [SHOW RETENTION POLICIES](#show-retention-policies)
|
||||
- [SHOW MEASUREMENTS](#show-measurements)
|
||||
- [SHOW FIELD KEYS](#show-field-keys)
|
||||
- [SHOW TAG KEYS](#show-tag-keys)
|
||||
- [SHOW TAG VALUES](#show-tag-values)
|
||||
|
||||
## SHOW RETENTION POLICIES
|
||||
|
||||
Use the `SHOW RETENTION POLICIES` statement to list retention policies associated
|
||||
with a database.
|
||||
Each database has a single retention policy--`autogen`.
|
||||
|
||||
{{% note %}}
|
||||
In {{< product-name >}}, retention policies are not part of the
|
||||
data structure but are expected by InfluxQL and used in fully-qualified measurements
|
||||
in the [`FROM` clause](/influxdb/clustered/reference/influxql/select/#from-clause).
|
||||
The data returned for each retention policy does not represent the actual
|
||||
retention-related attributes of the database. The values are placeholder values
|
||||
meant only for InfluxQL feature parity.
|
||||
|
||||
For information about database data retention, see
|
||||
[List databases](/influxdb/clustered/admin/databases/list/).
|
||||
{{% /note %}}
|
||||
|
||||
```sql
|
||||
SHOW RETENTION POLICIES [ON <database-name>]
|
||||
```
|
||||
|
||||
#### Examples
|
||||
|
||||
```sql
|
||||
-- Show retention policies in the database specified in the query request
|
||||
SHOW RETENTION POLICIES
|
||||
|
||||
-- Show retention policies in a specific database
|
||||
SHOW RETENTION POLICIES ON "example-database"
|
||||
```
|
||||
|
||||
## SHOW MEASUREMENTS
|
||||
|
||||
Use the `SHOW MEASUREMENTS` statement to list measurements in a database.
|
||||
|
|
|
|||
Loading…
Reference in New Issue