You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/10/23 23:34:31 UTC

[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #195: Add bydbctl's examples

hanahmily commented on code in PR #195:
URL: https://github.com/apache/skywalking-banyandb/pull/195#discussion_r1002791025


##########
docs/crud/property/schema.md:
##########
@@ -0,0 +1,124 @@
+# CRUD Property
+
+CRUD operations create/update, read and delete property.
+
+Property stores the user defined data.
+
+[`bydbctl`](../../clients.md#command-line) is the command line tool in examples.
+
+## Apply (Create/Update) operation
+
+Apply creates a property if it's absent, or updates an existed one based on a strategy. If the property does not currently exist, create operation will create the property.
+
+### Examples of applying
+
+A property belongs to a unique group. We should create such a group before creating a property.
+
+The group's catalog should be empty.
+
+```shell
+$ bydbctl group create -f - <<EOF
+metadata:
+  name: default
+schema_opts:
+  shard_num: 2
+  block_interval:
+    unit: UNIT_HOUR
+    num: 2
+  segment_interval:
+    unit: UNIT_DAY
+    num: 1
+  ttl:
+    unit: UNIT_DAY
+    num: 7
+EOF
+```
+
+The group creates two shards to store data points. Every day, it would create a
+segment that will generate a block every 2 hours.
+
+The data in this group will keep 7 days.
+
+Then, below command will create a new property:
+
+```shell
+$ bydbctl property apply -f - <<EOF
+metadata:
+  container:
+    group: default
+    name: container1
+  id: property1
+tags:
+- key: name
+  value:
+    str:
+      value: "hello"
+- key: state
+  value:
+    str:
+      value: "succeed"
+EOF
+```
+
+The operation supports updating partial tags.

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org