You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to set the metadata for a metric in the Python client library. Would anyone be able to help me with this?
My testing code for creating payload is:
# Publish birth for first metric
print('Publish birth')
columns = ["Timestamp", "ACC_X"]
types = [DataSetDataType.UInt64, DataSetDataType.Double]
# Periodically publish some new data
payload = getDdataPayload()
metaData_dsc = "My metadata description"
payload.MetaData.description = metaData_dsc
payload.MetaData.content_type = "xml"
payload.MetaData.size = len(metaData_dsc)
name = "Test metric"
alias = 0
metric = payload.metrics.add()
if name is not None:
metric.name = name
if alias is not None:
metric.alias = alias
metric.timestamp = int(round(time.time() * 1000))
metric.datatype = MetricDataType.DataSet
# Set up the dataset
metric.dataset_value.num_of_columns = len(types)
metric.dataset_value.columns.extend(columns)
metric.dataset_value.types.extend(types)
byteArray = bytearray(payload.SerializeToString())
In the debugger, I can see that the values for MetaData are set, but when serializing they are omitted.
The text was updated successfully, but these errors were encountered:
I have been trying to set the metadata for a metric in the Python client library. Would anyone be able to help me with this?
My testing code for creating payload is:
In the debugger, I can see that the values for MetaData are set, but when serializing they are omitted.
The text was updated successfully, but these errors were encountered: