Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs. #498

Merged
merged 1 commit into from
Jul 26, 2024
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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Release Notes.
### Documentation
- Introduce new doc menu structure.
- Add installation on Docker and Kubernetes.
- Add quick-start guide.

## 0.6.1

Expand Down
2 changes: 1 addition & 1 deletion docs/concept/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ interval: 1m

`Measure` consists of a sequence of data points. Each data point contains tags and fields.

`Tags` are key-value pairs. The database engine can index tag values by referring to the index rules and rule bindings, confining the query to filtering data points based on tags bound to an index rule.
`Tags` are key-value pairs. The database engine can index tag values by referring to the [index rules and rule bindings](#indexrule--indexrulebinding), confining the query to filtering data points based on tags bound to an index rule.

`Tags` are grouped into unique `tag_families` which are the logical and physical grouping of tags.

Expand Down
10 changes: 5 additions & 5 deletions docs/crud/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Create operation adds a new group to the database's metadata registry repository
### Examples of creating

```shell
$ bydbctl group create -f - <<EOF
bydbctl group create -f - <<EOF
metadata:
name: sw_metric
catalog: CATALOG_MEASURE
Expand All @@ -39,7 +39,7 @@ Get operation gets a group's schema.
### Examples of getting

```shell
$ bydbctl group get -g sw_metric
bydbctl group get -g sw_metric
```

## Update operation
Expand All @@ -51,7 +51,7 @@ Update operation updates a group's schema.
If we want to change the `ttl` of the data in this group to be 1 day, use the command:

```shell
$ bydbctl group update -f - <<EOF
bydbctl group update -f - <<EOF
metadata:
name: sw_metric
catalog: CATALOG_MEASURE
Expand All @@ -73,7 +73,7 @@ Delete operation deletes a group's schema.
### Examples of deleting

```shell
$ bydbctl group delete -g sw_metric
bydbctl group delete -g sw_metric
```

## List operation
Expand All @@ -83,7 +83,7 @@ The list operation shows all groups' schema.
### Examples

```shell
$ bydbctl group list
bydbctl group list
```

## API Reference
Expand Down
12 changes: 6 additions & 6 deletions docs/crud/index_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ An index rule belongs to its subjects' group. We should create such a group if t
The command supposes that the index rule will bind to streams. So it creates a `CATALOG_STREAM` group here.

```shell
$ bydbctl group create -f - <<EOF
bydbctl group create -f - <<EOF
metadata:
name: sw_stream
catalog: CATALOG_STREAM
Expand All @@ -41,7 +41,7 @@ The data in this group will keep 7 days.
Then, the next command will create a new index rule:

```shell
$ bydbctl indexRule create -f - <<EOF
bydbctl indexRule create -f - <<EOF
metadata:
name: trace_id
group: sw_stream
Expand All @@ -60,7 +60,7 @@ Get(Read) operation gets an index rule's schema.
### Examples of getting

```shell
$ bydbctl indexRule get -g sw_stream -n trace_id
bydbctl indexRule get -g sw_stream -n trace_id
```

## Update operation
Expand All @@ -72,7 +72,7 @@ Update operation updates an index rule's schema.
This example changes the type from `TREE` to `INVERTED`.

```shell
$ bydbctl indexRule update -f - <<EOF
bydbctl indexRule update -f - <<EOF
metadata:
name: trace_id
group: sw_stream
Expand All @@ -90,7 +90,7 @@ Delete operation deletes an index rule's schema.
### Examples of deleting

```shell
$ bydbctl indexRule delete -g sw_stream -n trace_id
bydbctl indexRule delete -g sw_stream -n trace_id
```

## List operation
Expand All @@ -100,7 +100,7 @@ List operation list all index rules' schema in a group.
### Examples of listing

```shell
$ bydbctl indexRule list -g sw_stream
bydbctl indexRule list -g sw_stream
```

## API Reference
Expand Down
12 changes: 6 additions & 6 deletions docs/crud/index_rule_binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Create operation adds a new index rule binding to the database's metadata regist
An index rule binding belongs to a unique group. We should create such a group with a catalog `CATALOG_STREAM` before creating a index rule binding. The subject(stream/measure) and index rule MUST live in the same group with the binding.

```shell
$ bydbctl group create -f - <<EOF
bydbctl group create -f - <<EOF
metadata:
name: default
catalog: CATALOG_STREAM
Expand All @@ -39,7 +39,7 @@ The data in this group will keep 7 days.
Then, below command will create a new indexRuleBinding:

```shell
$ bydbctl indexRuleBinding create -f - <<EOF
bydbctl indexRuleBinding create -f - <<EOF
metadata:
name: stream_binding
group: sw_stream
Expand Down Expand Up @@ -76,7 +76,7 @@ Get(Read) operation gets an index rule binding's schema.
### Examples of getting

```shell
$ bydbctl indexRuleBinding get -g sw_stream -n stream_binding
bydbctl indexRuleBinding get -g sw_stream -n stream_binding
```

## Update operation
Expand All @@ -86,7 +86,7 @@ Update operation update an index rule binding's schema.
### Examples updating

```shell
$ bydbctl indexRuleBinding update -f - <<EOF
bydbctl indexRuleBinding update -f - <<EOF
metadata:
name: stream_binding
group: sw_stream
Expand Down Expand Up @@ -119,7 +119,7 @@ Delete operation delete an index rule binding's schema.
### Examples of deleting

```shell
$ bydbctl indexRuleBinding delete -g sw_stream -n stream_binding
bydbctl indexRuleBinding delete -g sw_stream -n stream_binding
```

## List operation
Expand All @@ -129,7 +129,7 @@ List operation list all index rule bindings in a group.
### Examples of listing

```shell
$ bydbctl indexRuleBinding list -g sw_stream
bydbctl indexRuleBinding list -g sw_stream
```

## API Reference
Expand Down
24 changes: 11 additions & 13 deletions docs/crud/measure/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ e.g. "start = 2022-11-09T12:04:00Z", so "end = start + 30 minutes = 2022-11-09T1
To retrieve a series of data points between `2022-10-15T22:32:48Z` and `2022-10-15T23:32:48Z` could use the below command. These data points contain tags: `id` and `entity_id` that belong to a family `default`. They also choose fields: `total` and `value`.

```shell
$ bydbctl measure query -f - <<EOF
metadata:
name: "service_cpm_minute"
group: "sw_metric"
bydbctl measure query -f - <<EOF
name: "service_cpm_minute"
groups: ["measure-minute"]
tagProjection:
tagFamilies:
- name: "default"
tags: ["id", "entity_id"]
- name: "default"
tags: ["entity_id"]
fieldProjection:
names: ["total", "value"]
timeRange:
Expand All @@ -46,17 +45,16 @@ timeRange:
EOF
```

The below command could query data in the last 30 minutes using relative time duration :
The below command could query data in the last 10 minutes using relative time duration :

```shell
$ bydbctl measure query --start -30m -f - <<EOF
metadata:
name: "service_cpm_minute"
group: "sw_metric"
bydbctl measure query --start -10m -f - <<EOF
name: "service_cpm_minute"
groups: ["measure-minute"]
tagProjection:
tagFamilies:
- name: "default"
tags: ["id", "entity_id"]
- name: "default"
tags: ["entity_id"]
fieldProjection:
names: ["total", "value"]
EOF
Expand Down
12 changes: 6 additions & 6 deletions docs/crud/measure/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A measure belongs to a unique group. We should create such a group with a catalo
before creating a measure.

```shell
$ bydbctl group create -f - <<EOF
bydbctl group create -f - <<EOF
metadata:
name: sw_metric
catalog: CATALOG_MEASURE
Expand All @@ -37,7 +37,7 @@ The data in this group will keep 7 days.
Then, the below command will create a new measure:

```shell
$ bydbctl measure create -f - <<EOF
bydbctl measure create -f - <<EOF
metadata:
name: service_cpm_minute
group: sw_metric
Expand Down Expand Up @@ -73,7 +73,7 @@ Get(Read) operation gets a measure's schema.
### Examples of getting

```shell
$ bydbctl measure get -g sw_metric -n service_cpm_minute
bydbctl measure get -g sw_metric -n service_cpm_minute
```

## Update operation
Expand All @@ -83,7 +83,7 @@ Update operation changes a measure's schema.
### Examples of updating

```shell
$ bydbctl measure update -f - <<EOF
bydbctl measure update -f - <<EOF
metadata:
name: service_cpm_minute
group: sw_metric
Expand All @@ -105,7 +105,7 @@ Delete operation removes a measure's schema.
### Examples of deleting

```shell
$ bydbctl measure delete -g sw_metric -n service_cpm_minute
bydbctl measure delete -g sw_metric -n service_cpm_minute
```

## List operation
Expand All @@ -115,7 +115,7 @@ The list operation shows all measures' schema in a group.
### Examples of listing

```shell
$ bydbctl measure list -g sw_metric
bydbctl measure list -g sw_metric
```

## API Reference
Expand Down
26 changes: 13 additions & 13 deletions docs/crud/property.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A property belongs to a unique group. We should create such a group before creat
The group's catalog should be empty.

```shell
$ bydbctl group create -f - <<EOF
bydbctl group create -f - <<EOF
metadata:
name: sw
EOF
Expand All @@ -26,7 +26,7 @@ EOF
Then, below command will create a new property:

```shell
$ bydbctl property apply -f - <<EOF
bydbctl property apply -f - <<EOF
metadata:
container:
group: sw
Expand All @@ -47,7 +47,7 @@ EOF
The operation supports updating partial tags.

```shell
$ bydbctl property apply -f - <<EOF
bydbctl property apply -f - <<EOF
metadata:
container:
group: sw
Expand All @@ -64,7 +64,7 @@ EOF
TTL is supported in the operation.

```shell
$ bydbctl property apply -f - <<EOF
bydbctl property apply -f - <<EOF
metadata:
container:
group: sw
Expand All @@ -85,13 +85,13 @@ Get operation gets a property.
### Examples of getting

```shell
$ bydbctl property get -g sw -n temp_data --id General-Service
bydbctl property get -g sw -n temp_data --id General-Service
```

The operation could filter data by tags.

```shell
$ bydbctl property get -g sw -n temp_data --id General-Service --tags state
bydbctl property get -g sw -n temp_data --id General-Service --tags state
```

## Delete operation
Expand All @@ -101,13 +101,13 @@ Delete operation delete a property.
### Examples of deleting

```shell
$ bydbctl property delete -g sw -n temp_data --id General-Service
bydbctl property delete -g sw -n temp_data --id General-Service
```

The delete operation could remove specific tags instead of the whole property.

```shell
$ bydbctl property delete -g sw -n temp_data --id General-Service --tags state
bydbctl property delete -g sw -n temp_data --id General-Service --tags state
```

## List operation
Expand All @@ -117,15 +117,15 @@ List operation lists all properties in a group.
### Examples of listing in a group

```shell
$ bydbctl property list -g sw
bydbctl property list -g sw
```

List operation lists all properties in a group with a name.

### Examples of listing in a group with a name

```shell
$ bydbctl property list -g sw -n temp_data
bydbctl property list -g sw -n temp_data
```

## TTL field in a property
Expand All @@ -137,7 +137,7 @@ This functionality is supported by the lease mechanism. The readonly lease_id fi
### Examples of setting TTL

```shell
$ bydbctl property apply -f - <<EOF
bydbctl property apply -f - <<EOF
metadata:
container:
group: sw
Expand All @@ -156,14 +156,14 @@ The lease_id is returned in the response.
You can use get operation to get the property with the lease_id as well.

```shell
$ bydbctl property get -g sw -n temp_data --id General-Service
bydbctl property get -g sw -n temp_data --id General-Service
```

The lease_id is used to keep the property alive. You can use keepalive operation to keep the property alive.
When the keepalive operation is called, the property's TTL will be reset to the original value.

```shell
$ bydbctl property keepalive --lease_id 1
bydbctl property keepalive --lease_id 1
```


Expand Down
Loading
Loading