vdesabou / kafka-docker-playground

🐳✨ Fully automated Apache Kafka® and Confluent Docker based examples // 👷‍♂️ Easily build examples or reproduction models
https://kafka-docker-playground.io
MIT License
653 stars 206 forks source link

Add playground tools read-avro-file command #5681

Closed vdesabou closed 3 months ago

vdesabou commented 3 months ago
playground  tools read-avro-file --file @/Users/vsaboulin/Downloads/file3.avro                  
17:00:00 ℹ️ 🔖 file3.avro.avro schema
{
  "type" : "record",
  "name" : "myrecord",
  "fields" : [ {
    "name" : "f1",
    "type" : "string"
  }, {
    "name" : "Timestamp",
    "type" : [ "null", {
      "type" : "long",
      "logicalType" : "timestamp-millis"
    } ],
    "default" : null
  } ]
}
17:00:01 ℹ️ 🔖 file3.avro.avro content
{"f1":"value1","Timestamp":{"long":1717683927447}}
{"f1":"value2","Timestamp":{"long":1717683927465}}
{"f1":"value3","Timestamp":{"long":1717683927465}}
{"f1":"value4","Timestamp":{"long":1717683927465}}
{"f1":"value5","Timestamp":{"long":1717683927465}}