wu-sheng commented on code in PR #195: URL: https://github.com/apache/skywalking-banyandb/pull/195#discussion_r1002507924
########## docs/crud/measure/schema.md: ########## @@ -0,0 +1,123 @@ +# CRUD Measures + +CRUD operations create, read, update and delete measures. + +[`bydbctl`](../../clients.md#command-line) is the command line tool in examples. + +## Create operation + +Create operation adds a new measure to the database's metadata registry repository. If the measure does not currently exist, create operation will create the schema. + +### Examples of creating + +A measure belongs to a unique group. We should create such a group with a catalog `CATALOG_MEASURE` +before creating a measure. + +```shell +$ bydbctl group create -f - <<EOF +metadata: + name: sw_metric +catalog: CATALOG_MEASURE +resource_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. Review Comment: Should we mention how would process various dimensions(day/hour/minute) measures? Because this is a unique design from OAP, and most time-series DB doesn't have this kind of support. -- 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]
