Protocol Documentation

Table of Contents

banyandb/common/v1/common.proto

Group

Group is an internal object for Group management

FieldTypeLabelDescription
metadataMetadatametadata define the group's identity
catalogCatalogcatalog denotes which type of data the group contains
resource_optsResourceOptsresourceOpts indicates the structure of the underlying kv storage
updated_atgoogle.protobuf.Timestampupdated_at indicates when resources of the group are updated

Metadata

Metadata is for multi-tenant, multi-model use

FieldTypeLabelDescription
groupstringgroup contains a set of options, like retention policy, max
namestringname of the entity
iduint32
create_revisionint64readonly. create_revision is the revision of last creation on this key.
mod_revisionint64readonly. mod_revision is the revision of last modification on this key.

ResourceOpts

FieldTypeLabelDescription
shard_numuint32shard_num is the number of shards
block_numuint32block_num specific how many blocks in a segment
ttlstringttl indicates time to live, how long the data will be cached

Catalog

NameNumberDescription
CATALOG_UNSPECIFIED0
CATALOG_STREAM1
CATALOG_MEASURE2

banyandb/database/v1/database.proto

Node

FieldTypeLabelDescription
idstring
addrstring
updated_atgoogle.protobuf.Timestamp
created_atgoogle.protobuf.Timestamp

Shard

FieldTypeLabelDescription
iduint64
metadatabanyandb.common.v1.Metadata
catalogbanyandb.common.v1.Catalog
nodeNode
totaluint32
updated_atgoogle.protobuf.Timestamp
created_atgoogle.protobuf.Timestamp

banyandb/model/v1/common.proto

FieldValue

FieldTypeLabelDescription
nullgoogle.protobuf.NullValue
strStr
intInt
binary_databytes

ID

FieldTypeLabelDescription
valuestring

Int

FieldTypeLabelDescription
valueint64

IntArray

FieldTypeLabelDescription
valueint64repeated

Str

FieldTypeLabelDescription
valuestring

StrArray

FieldTypeLabelDescription
valuestringrepeated

TagFamilyForWrite

FieldTypeLabelDescription
tagsTagValuerepeated

TagValue

FieldTypeLabelDescription
nullgoogle.protobuf.NullValue
strStr
str_arrayStrArray
intInt
int_arrayIntArray
binary_databytes
idID

AggregationFunction

NameNumberDescription
AGGREGATION_FUNCTION_UNSPECIFIED0
AGGREGATION_FUNCTION_MEAN1
AGGREGATION_FUNCTION_MAX2
AGGREGATION_FUNCTION_MIN3
AGGREGATION_FUNCTION_COUNT4
AGGREGATION_FUNCTION_SUM5

banyandb/model/v1/query.proto

Condition

Condition consists of the query condition with a single binary operator to be imposed For 1:1 BinaryOp, values in condition must be an array with length = 1, while for 1:N BinaryOp, values can be an array with length >= 1.

FieldTypeLabelDescription
namestring
opCondition.BinaryOp
valueTagValue

Criteria

tag_families are indexed.

FieldTypeLabelDescription
tag_family_namestring
conditionsConditionrepeated

QueryOrder

QueryOrder means a Sort operation to be done for a given index rule. The index_rule_name refers to the name of a index rule bound to the subject.

FieldTypeLabelDescription
index_rule_namestring
sortSort

Tag

Pair is the building block of a record which is equivalent to a key-value pair. In the context of Trace, it could be metadata of a trace such as service_name, service_instance, etc. Besides, other tags are organized in key-value pair in the underlying storage layer. One should notice that the values can be a multi-value.

FieldTypeLabelDescription
keystring
valueTagValue

TagFamily

FieldTypeLabelDescription
namestring
tagsTagrepeated

TagProjection

TagProjection is used to select the names of keys to be returned.

FieldTypeLabelDescription
tag_familiesTagProjection.TagFamilyrepeated

TagProjection.TagFamily

FieldTypeLabelDescription
namestring
tagsstringrepeated

TimeRange

TimeRange is a range query for uint64, the range here follows left-inclusive and right-exclusive rule, i.e. [begin, end) if both edges exist

FieldTypeLabelDescription
begingoogle.protobuf.Timestamp
endgoogle.protobuf.Timestamp

Condition.BinaryOp

BinaryOp specifies the operation imposed to the given query condition For EQ, NE, LT, GT, LE and GE, only one operand should be given, i.e. one-to-one relationship. HAVING and NOT_HAVING allow multi-value to be the operand such as array/vector, i.e. one-to-many relationship. For example, "keyA" contains "valueA" and "valueB"

NameNumberDescription
BINARY_OP_UNSPECIFIED0
BINARY_OP_EQ1
BINARY_OP_NE2
BINARY_OP_LT3
BINARY_OP_GT4
BINARY_OP_LE5
BINARY_OP_GE6
BINARY_OP_HAVING7
BINARY_OP_NOT_HAVING8
BINARY_OP_IN9
BINARY_OP_NOT_IN10

Sort

NameNumberDescription
SORT_UNSPECIFIED0
SORT_DESC1
SORT_ASC2

banyandb/database/v1/schema.proto

Entity

FieldTypeLabelDescription
tag_namesstringrepeated

FieldSpec

FieldSpec is the specification of field

FieldTypeLabelDescription
namestringname is the identity of a field
field_typeFieldTypefield_type denotes the type of field value
encoding_methodEncodingMethodencoding_method indicates how to encode data during writing
compression_methodCompressionMethodcompression_method indicates how to compress data during writing

IndexRule

IndexRule defines how to generate indices based on tags and the index type IndexRule should bind to a subject through an IndexRuleBinding to generate proper indices.

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata define the rule's identity
tagsstringrepeatedtags are the combination that refers to an indexed object If the elements in tags are more than 1, the object will generate a multi-tag index Caveat: All tags in a multi-tag MUST have an identical IndexType
typeIndexRule.Typetype is the IndexType of this IndexObject.
locationIndexRule.Locationlocation indicates where to store index.
updated_atgoogle.protobuf.Timestampupdated_at indicates when the IndexRule is updated

IndexRuleBinding

IndexRuleBinding is a bridge to connect severalIndexRules to a subject This binding is valid between begin_at_nanoseconds and expire_at_nanoseconds, that provides flexible strategies to control how to generate time series indices.

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is the identity of this binding
rulesstringrepeatedrules refers to the IndexRule
subjectSubjectsubject indicates the subject of binding action
begin_atgoogle.protobuf.Timestampbegin_at_nanoseconds is the timestamp, after which the binding will be active
expire_atgoogle.protobuf.Timestampexpire_at_nanoseconds it the timestamp, after which the binding will be inactive expire_at_nanoseconds must be larger than begin_at_nanoseconds
updated_atgoogle.protobuf.Timestampupdated_at indicates when the IndexRuleBinding is updated

Measure

Measure intends to store data point

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is the identity of a measure
tag_familiesTagFamilySpecrepeatedtag_families are for filter measures
fieldsFieldSpecrepeatedfields denote measure values
entityEntityentity indicates which tags will be to generate a series and shard a measure
intervalstringinterval indicates how frequently to send a data point valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h", "d".
updated_atgoogle.protobuf.Timestampupdated_at indicates when the measure is updated

Stream

Stream intends to store streaming data, for example, traces or logs

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is the identity of a trace series
tag_familiesTagFamilySpecrepeatedtag_families
entityEntityentity indicates how to generate a series and shard a stream
updated_atgoogle.protobuf.Timestampupdated_at indicates when the stream is updated

Subject

Subject defines which stream or measure would generate indices

FieldTypeLabelDescription
catalogbanyandb.common.v1.Catalogcatalog is where the subject belongs to
namestringname refers to a stream or measure in a particular catalog

TagFamilySpec

FieldTypeLabelDescription
namestring
tagsTagSpecrepeatedtags defines accepted tags

TagSpec

FieldTypeLabelDescription
namestring
typeTagType

TopNAggregation

TopNAggregation generates offline TopN statistics for a measure's TopN approximation

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is the identity of an aggregation
source_measurebanyandb.common.v1.Metadatasource_measure denotes the data source of this aggregation
field_namestringfield_name is the name of field used for ranking
field_value_sortbanyandb.model.v1.Sortfield_value_sort indicates how to sort fields ASC: bottomN DESC: topN UNSPECIFIED: topN + bottomN
group_by_tag_namesstringrepeatedgroup_by_tag_names groups data points into statistical counters
criteriabanyandb.model.v1.Criteriarepeatedcriteria select partial data points from measure
counters_numberint32counters_number sets the number of counters to be tracked. The default value is 1000
updated_atgoogle.protobuf.Timestampupdated_at indicates when the measure is updated

CompressionMethod

NameNumberDescription
COMPRESSION_METHOD_UNSPECIFIED0
COMPRESSION_METHOD_ZSTD1

EncodingMethod

NameNumberDescription
ENCODING_METHOD_UNSPECIFIED0
ENCODING_METHOD_GORILLA1

FieldType

NameNumberDescription
FIELD_TYPE_UNSPECIFIED0
FIELD_TYPE_STRING1
FIELD_TYPE_INT2
FIELD_TYPE_DATA_BINARY3

IndexRule.Location

NameNumberDescription
LOCATION_UNSPECIFIED0
LOCATION_SERIES1
LOCATION_GLOBAL2

IndexRule.Type

Type determine the index structure under the hood

NameNumberDescription
TYPE_UNSPECIFIED0
TYPE_TREE1
TYPE_INVERTED2

TagType

NameNumberDescription
TAG_TYPE_UNSPECIFIED0
TAG_TYPE_STRING1
TAG_TYPE_INT2
TAG_TYPE_STRING_ARRAY3
TAG_TYPE_INT_ARRAY4
TAG_TYPE_DATA_BINARY5
TAG_TYPE_ID6

banyandb/database/v1/event.proto

EntityEvent

FieldTypeLabelDescription
subjectbanyandb.common.v1.Metadata
entity_locatorEntityEvent.TagLocatorrepeated
actionAction
timegoogle.protobuf.Timestamp

EntityEvent.TagLocator

FieldTypeLabelDescription
family_offsetuint32
tag_offsetuint32

ShardEvent

FieldTypeLabelDescription
shardShard
actionAction
timegoogle.protobuf.Timestamp

Action

NameNumberDescription
ACTION_UNSPECIFIED0
ACTION_PUT1
ACTION_DELETE2

banyandb/database/v1/rpc.proto

GroupRegistryServiceCreateRequest

FieldTypeLabelDescription
groupbanyandb.common.v1.Group

GroupRegistryServiceCreateResponse

GroupRegistryServiceDeleteRequest

FieldTypeLabelDescription
groupstring

GroupRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

GroupRegistryServiceGetRequest

FieldTypeLabelDescription
groupstring

GroupRegistryServiceGetResponse

FieldTypeLabelDescription
groupbanyandb.common.v1.Group

GroupRegistryServiceListRequest

GroupRegistryServiceListResponse

FieldTypeLabelDescription
groupbanyandb.common.v1.Grouprepeated

GroupRegistryServiceUpdateRequest

FieldTypeLabelDescription
groupbanyandb.common.v1.Group

GroupRegistryServiceUpdateResponse

IndexRuleBindingRegistryServiceCreateRequest

FieldTypeLabelDescription
index_rule_bindingIndexRuleBinding

IndexRuleBindingRegistryServiceCreateResponse

IndexRuleBindingRegistryServiceDeleteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

IndexRuleBindingRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

IndexRuleBindingRegistryServiceGetRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

IndexRuleBindingRegistryServiceGetResponse

FieldTypeLabelDescription
index_rule_bindingIndexRuleBinding

IndexRuleBindingRegistryServiceListRequest

FieldTypeLabelDescription
groupstring

IndexRuleBindingRegistryServiceListResponse

FieldTypeLabelDescription
index_rule_bindingIndexRuleBindingrepeated

IndexRuleBindingRegistryServiceUpdateRequest

FieldTypeLabelDescription
index_rule_bindingIndexRuleBinding

IndexRuleBindingRegistryServiceUpdateResponse

IndexRuleRegistryServiceCreateRequest

FieldTypeLabelDescription
index_ruleIndexRule

IndexRuleRegistryServiceCreateResponse

IndexRuleRegistryServiceDeleteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

IndexRuleRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

IndexRuleRegistryServiceGetRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

IndexRuleRegistryServiceGetResponse

FieldTypeLabelDescription
index_ruleIndexRule

IndexRuleRegistryServiceListRequest

FieldTypeLabelDescription
groupstring

IndexRuleRegistryServiceListResponse

FieldTypeLabelDescription
index_ruleIndexRulerepeated

IndexRuleRegistryServiceUpdateRequest

FieldTypeLabelDescription
index_ruleIndexRule

IndexRuleRegistryServiceUpdateResponse

MeasureRegistryServiceCreateRequest

FieldTypeLabelDescription
measureMeasure

MeasureRegistryServiceCreateResponse

MeasureRegistryServiceDeleteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

MeasureRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

MeasureRegistryServiceGetRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

MeasureRegistryServiceGetResponse

FieldTypeLabelDescription
measureMeasure

MeasureRegistryServiceListRequest

FieldTypeLabelDescription
groupstring

MeasureRegistryServiceListResponse

FieldTypeLabelDescription
measureMeasurerepeated

MeasureRegistryServiceUpdateRequest

FieldTypeLabelDescription
measureMeasure

MeasureRegistryServiceUpdateResponse

StreamRegistryServiceCreateRequest

FieldTypeLabelDescription
streamStream

StreamRegistryServiceCreateResponse

StreamRegistryServiceDeleteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

StreamRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

StreamRegistryServiceGetRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

StreamRegistryServiceGetResponse

FieldTypeLabelDescription
streamStream

StreamRegistryServiceListRequest

FieldTypeLabelDescription
groupstring

StreamRegistryServiceListResponse

FieldTypeLabelDescription
streamStreamrepeated

StreamRegistryServiceUpdateRequest

FieldTypeLabelDescription
streamStream

StreamRegistryServiceUpdateResponse

TopNAggregationRegistryServiceCreateRequest

FieldTypeLabelDescription
top_n_aggregationTopNAggregation

TopNAggregationRegistryServiceCreateResponse

TopNAggregationRegistryServiceDeleteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

TopNAggregationRegistryServiceDeleteResponse

FieldTypeLabelDescription
deletedbool

TopNAggregationRegistryServiceGetRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadata

TopNAggregationRegistryServiceGetResponse

FieldTypeLabelDescription
top_n_aggregationTopNAggregation

TopNAggregationRegistryServiceListRequest

FieldTypeLabelDescription
groupstring

TopNAggregationRegistryServiceListResponse

FieldTypeLabelDescription
top_n_aggregationTopNAggregationrepeated

TopNAggregationRegistryServiceUpdateRequest

FieldTypeLabelDescription
top_n_aggregationTopNAggregation

TopNAggregationRegistryServiceUpdateResponse

GroupRegistryService

Method NameRequest TypeResponse TypeDescription
CreateGroupRegistryServiceCreateRequestGroupRegistryServiceCreateResponse
UpdateGroupRegistryServiceUpdateRequestGroupRegistryServiceUpdateResponse
DeleteGroupRegistryServiceDeleteRequestGroupRegistryServiceDeleteResponse
GetGroupRegistryServiceGetRequestGroupRegistryServiceGetResponse
ListGroupRegistryServiceListRequestGroupRegistryServiceListResponse

IndexRuleBindingRegistryService

Method NameRequest TypeResponse TypeDescription
CreateIndexRuleBindingRegistryServiceCreateRequestIndexRuleBindingRegistryServiceCreateResponse
UpdateIndexRuleBindingRegistryServiceUpdateRequestIndexRuleBindingRegistryServiceUpdateResponse
DeleteIndexRuleBindingRegistryServiceDeleteRequestIndexRuleBindingRegistryServiceDeleteResponse
GetIndexRuleBindingRegistryServiceGetRequestIndexRuleBindingRegistryServiceGetResponse
ListIndexRuleBindingRegistryServiceListRequestIndexRuleBindingRegistryServiceListResponse

IndexRuleRegistryService

Method NameRequest TypeResponse TypeDescription
CreateIndexRuleRegistryServiceCreateRequestIndexRuleRegistryServiceCreateResponse
UpdateIndexRuleRegistryServiceUpdateRequestIndexRuleRegistryServiceUpdateResponse
DeleteIndexRuleRegistryServiceDeleteRequestIndexRuleRegistryServiceDeleteResponse
GetIndexRuleRegistryServiceGetRequestIndexRuleRegistryServiceGetResponse
ListIndexRuleRegistryServiceListRequestIndexRuleRegistryServiceListResponse

MeasureRegistryService

Method NameRequest TypeResponse TypeDescription
CreateMeasureRegistryServiceCreateRequestMeasureRegistryServiceCreateResponse
UpdateMeasureRegistryServiceUpdateRequestMeasureRegistryServiceUpdateResponse
DeleteMeasureRegistryServiceDeleteRequestMeasureRegistryServiceDeleteResponse
GetMeasureRegistryServiceGetRequestMeasureRegistryServiceGetResponse
ListMeasureRegistryServiceListRequestMeasureRegistryServiceListResponse

StreamRegistryService

Method NameRequest TypeResponse TypeDescription
CreateStreamRegistryServiceCreateRequestStreamRegistryServiceCreateResponse
UpdateStreamRegistryServiceUpdateRequestStreamRegistryServiceUpdateResponse
DeleteStreamRegistryServiceDeleteRequestStreamRegistryServiceDeleteResponse
GetStreamRegistryServiceGetRequestStreamRegistryServiceGetResponse
ListStreamRegistryServiceListRequestStreamRegistryServiceListResponse

TopNAggregationRegistryService

Method NameRequest TypeResponse TypeDescription
CreateTopNAggregationRegistryServiceCreateRequestTopNAggregationRegistryServiceCreateResponse
UpdateTopNAggregationRegistryServiceUpdateRequestTopNAggregationRegistryServiceUpdateResponse
DeleteTopNAggregationRegistryServiceDeleteRequestTopNAggregationRegistryServiceDeleteResponse
GetTopNAggregationRegistryServiceGetRequestTopNAggregationRegistryServiceGetResponse
ListTopNAggregationRegistryServiceListRequestTopNAggregationRegistryServiceListResponse

banyandb/measure/v1/query.proto

DataPoint

DataPoint is stored in Measures

FieldTypeLabelDescription
timestampgoogle.protobuf.Timestamptimestamp is in the timeunit of milliseconds.
tag_familiesbanyandb.model.v1.TagFamilyrepeatedtag_families contains tags selected in the projection
fieldsDataPoint.Fieldrepeatedfields contains fields selected in the projection

DataPoint.Field

FieldTypeLabelDescription
namestring
valuebanyandb.model.v1.FieldValue

QueryRequest

QueryRequest is the request contract for query.

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is required
time_rangebanyandb.model.v1.TimeRangetime_range is a range query with begin/end time of entities in the timeunit of milliseconds.
criteriabanyandb.model.v1.Criteriarepeatedtag_families are indexed.
tag_projectionbanyandb.model.v1.TagProjectiontag_projection can be used to select tags of the data points in the response
field_projectionQueryRequest.FieldProjectionfield_projection can be used to select fields of the data points in the response
group_byQueryRequest.GroupBygroup_by groups data points based on their field value for a specific tag and use field_name as the projection name
aggQueryRequest.Aggregationagg aggregates data points based on a field
topQueryRequest.Toptop limits the result based on a particular field. If order_by is specificed, top sorts the dataset based on order_by's output
offsetuint32offset is used to support pagination, together with the following limit. If top is sepcificed, offset processes the dataset based on top's output
limituint32limit is used to impose a boundary on the number of records being returned. If top is sepcificed, limit processes the dataset based on top's output
order_bybanyandb.model.v1.QueryOrderorder_by is given to specify the sort for a tag.

QueryRequest.Aggregation

FieldTypeLabelDescription
functionbanyandb.model.v1.AggregationFunction
field_namestringfield_name must be one of files indicated by the field_projection

QueryRequest.FieldProjection

FieldTypeLabelDescription
namesstringrepeated

QueryRequest.GroupBy

FieldTypeLabelDescription
tag_projectionbanyandb.model.v1.TagProjectiontag_projection must be a subset of the tag_projection of QueryRequest
field_namestringfield_name must be one of fields indicated by field_projection

QueryRequest.Top

FieldTypeLabelDescription
numberint32number set the how many items should be returned
field_namestringfield_name must be one of files indicated by the field_projection
field_value_sortbanyandb.model.v1.Sortfield_value_sort indicates how to sort fields ASC: bottomN DESC: topN UNSPECIFIED: topN

QueryResponse

QueryResponse is the response for a query to the Query module.

FieldTypeLabelDescription
data_pointsDataPointrepeateddata_points are the actual data returned

banyandb/measure/v1/write.proto

DataPointValue

DataPointValue is the data point for writing. It only contains values.

FieldTypeLabelDescription
timestampgoogle.protobuf.Timestamptimestamp is in the timeunit of milliseconds.
tag_familiesbanyandb.model.v1.TagFamilyForWriterepeatedthe order of tag_families' items match the measure schema
fieldsbanyandb.model.v1.FieldValuerepeatedthe order of fields match the measure schema

InternalWriteRequest

FieldTypeLabelDescription
shard_iduint32
series_hashbytes
requestWriteRequest

WriteRequest

WriteRequest is the request contract for write

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatathe metadata is required.
data_pointDataPointValuethe data_point is required.

WriteResponse

WriteResponse is the response contract for write

banyandb/measure/v1/topn.proto

TopNList

TopNList contains a series of topN items

FieldTypeLabelDescription
timestampgoogle.protobuf.Timestamptimestamp is in the timeunit of milliseconds.
itemsTopNList.Itemrepeateditems contains top-n items in a list

TopNList.Item

FieldTypeLabelDescription
namestring
valuebanyandb.model.v1.FieldValue

TopNRequest

TopNRequest is the request contract for query.

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is required
time_rangebanyandb.model.v1.TimeRangetime_range is a range query with begin/end time of entities in the timeunit of milliseconds.
top_nint32top_n set the how many items should be returned in each list.
aggbanyandb.model.v1.AggregationFunctionagg aggregates lists grouped by field names in the time_range
conditionsbanyandb.model.v1.Conditionrepeatedcriteria select counters.
field_value_sortbanyandb.model.v1.Sortfield_value_sort indicates how to sort fields

TopNResponse

TopNResponse is the response for a query to the Query module.

FieldTypeLabelDescription
listsTopNListrepeatedlists contain a series topN lists ranked by timestamp if agg_func in query request is specified, lists' size should be one.

banyandb/measure/v1/rpc.proto

MeasureService

Method NameRequest TypeResponse TypeDescription
QueryQueryRequestQueryResponse
WriteWriteRequest streamWriteResponse stream
TopNTopNRequestTopNResponse

banyandb/property/v1/property.proto

Metadata

Metadata is for multi-tenant use

FieldTypeLabelDescription
containerbanyandb.common.v1.Metadatacontainer is created when it receives the first property
idstringid identifies a property

Property

Property stores the user defined data

FieldTypeLabelDescription
metadataMetadatametadata is the identity of a property
tagsbanyandb.model.v1.Tagrepeatedtag stores the content of a property
updated_atgoogle.protobuf.Timestampupdated_at indicates when the property is updated

banyandb/property/v1/rpc.proto

CreateRequest

FieldTypeLabelDescription
propertyProperty

CreateResponse

DeleteRequest

FieldTypeLabelDescription
metadataMetadata

DeleteResponse

FieldTypeLabelDescription
deletedbool

GetRequest

FieldTypeLabelDescription
metadataMetadata

GetResponse

FieldTypeLabelDescription
propertyProperty

ListRequest

FieldTypeLabelDescription
containerbanyandb.common.v1.Metadata

ListResponse

FieldTypeLabelDescription
propertyPropertyrepeated

UpdateRequest

FieldTypeLabelDescription
propertyProperty

UpdateResponse

PropertyService

Method NameRequest TypeResponse TypeDescription
CreateCreateRequestCreateResponse
UpdateUpdateRequestUpdateResponse
DeleteDeleteRequestDeleteResponse
GetGetRequestGetResponse
ListListRequestListResponse

banyandb/stream/v1/query.proto

Element

Element represents (stream context) a Span defined in Google Dapper paper or equivalently a Segment in Skywalking. (Log context) a log

FieldTypeLabelDescription
element_idstringelement_id could be span_id of a Span or segment_id of a Segment in the context of stream
timestampgoogle.protobuf.Timestamptimestamp represents a millisecond 1) either the start time of a Span/Segment, 2) or the timestamp of a log
tag_familiesbanyandb.model.v1.TagFamilyrepeatedfields contains all indexed Field. Some typical names, - stream_id - duration - service_name - service_instance_id - end_time_milliseconds

QueryRequest

QueryRequest is the request contract for query.

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatametadata is required
time_rangebanyandb.model.v1.TimeRangetime_range is a range query with begin/end time of entities in the timeunit of milliseconds. In the context of stream, it represents the range of the startTime for spans/segments, while in the context of Log, it means the range of the timestamp(s) for logs. it is always recommended to specify time range for performance reason
offsetuint32offset is used to support pagination, together with the following limit
limituint32limit is used to impose a boundary on the number of records being returned
order_bybanyandb.model.v1.QueryOrderorder_by is given to specify the sort for a field. So far, only fields in the type of Integer are supported
criteriabanyandb.model.v1.Criteriarepeatedtag_families are indexed.
projectionbanyandb.model.v1.TagProjectionprojection can be used to select the key names of the element in the response

QueryResponse

QueryResponse is the response for a query to the Query module.

FieldTypeLabelDescription
elementsElementrepeatedelements are the actual data returned

banyandb/stream/v1/write.proto

ElementValue

FieldTypeLabelDescription
element_idstringelement_id could be span_id of a Span or segment_id of a Segment in the context of stream
timestampgoogle.protobuf.Timestamptimestamp is in the timeunit of milliseconds. It represents 1) either the start time of a Span/Segment, 2) or the timestamp of a log
tag_familiesbanyandb.model.v1.TagFamilyForWriterepeatedthe order of tag_families' items match the stream schema

InternalWriteRequest

FieldTypeLabelDescription
shard_iduint32
series_hashbytes
requestWriteRequest

WriteRequest

FieldTypeLabelDescription
metadatabanyandb.common.v1.Metadatathe metadata is only required in the first write.
elementElementValuethe element is required.

WriteResponse

banyandb/stream/v1/rpc.proto

StreamService

Method NameRequest TypeResponse TypeDescription
QueryQueryRequestQueryResponse
WriteWriteRequest streamWriteResponse stream

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)