Example¶
This data takes a string value and parses the data based on the OpenTSDB wire protocol.
{
"topic" : "foo",
"kafkaPartition" : 1,
"keySchema" : {
"type" : "STRING",
"isOptional" : false
},
"key" : "foo",
"valueSchema" : {
"type" : "STRING",
"isOptional" : false
},
"value" : "mysql.bytes_received 1287333217 327810227706 schema=foo host=db1",
"timestamp" : 1530286549123,
"timestampType" : "CREATE_TIME",
"offset" : 91283741,
"headers" : [ ]
}
Change(s) in the output are emphasized if delta(s) are detected.
{
"topic" : "foo",
"kafkaPartition" : 1,
"keySchema" : {
"type" : "STRING",
"isOptional" : false
},
"key" : "foo",
"valueSchema" : {
"name" : "net.opentsdb.model.DataPoint",
"type" : "STRUCT",
"isOptional" : false,
"fieldSchemas" : {
"metricName" : {
"doc" : "",
"type" : "STRING",
"isOptional" : false
},
"timestamp" : {
"name" : "org.apache.kafka.connect.data.Timestamp",
"doc" : "",
"type" : "INT64",
"version" : 1,
"isOptional" : false
},
"value" : {
"doc" : "",
"type" : "FLOAT64",
"isOptional" : true
},
"tags" : {
"doc" : "",
"type" : "MAP",
"isOptional" : false,
"keySchema" : {
"type" : "STRING",
"isOptional" : false
},
"valueSchema" : {
"type" : "STRING",
"isOptional" : false
}
}
}
},
"value" : {
"schema" : {
"name" : "net.opentsdb.model.DataPoint",
"type" : "STRUCT",
"isOptional" : false,
"fieldSchemas" : {
"metricName" : {
"doc" : "",
"type" : "STRING",
"isOptional" : false
},
"timestamp" : {
"name" : "org.apache.kafka.connect.data.Timestamp",
"doc" : "",
"type" : "INT64",
"version" : 1,
"isOptional" : false
},
"value" : {
"doc" : "",
"type" : "FLOAT64",
"isOptional" : true
},
"tags" : {
"doc" : "",
"type" : "MAP",
"isOptional" : false,
"keySchema" : {
"type" : "STRING",
"isOptional" : false
},
"valueSchema" : {
"type" : "STRING",
"isOptional" : false
}
}
}
},
"fieldValues" : [ {
"name" : "metricName",
"schema" : {
"doc" : "",
"type" : "STRING",
"isOptional" : false
},
"storage" : "mysql.bytes_received"
}, {
"name" : "timestamp",
"schema" : {
"name" : "org.apache.kafka.connect.data.Timestamp",
"doc" : "",
"type" : "INT64",
"version" : 1,
"isOptional" : false
},
"storage" : 1287333217000
}, {
"name" : "value",
"schema" : {
"doc" : "",
"type" : "FLOAT64",
"isOptional" : true
},
"storage" : 3.27810227706E11
}, {
"name" : "tags",
"schema" : {
"doc" : "",
"type" : "MAP",
"isOptional" : false,
"keySchema" : {
"type" : "STRING",
"isOptional" : false
},
"valueSchema" : {
"type" : "STRING",
"isOptional" : false
}
},
"storage" : {
"schema" : "foo",
"host" : "db1"
}
} ]
},
"timestamp" : 1530286549123,
"timestampType" : "CREATE_TIME",
"offset" : 91283741,
"headers" : [ ]
}