wu-sheng commented on code in PR #195:
URL: 
https://github.com/apache/skywalking-banyandb/pull/195#discussion_r1002506205


##########
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:
   Use `sw` or `default` as group should be fine, (in codes, it is `sw`). But 
it should be consistent in these examples.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to