我想使用Avro模式并在python中读取它。无法读取架构。它抛出了一个错误
import avro.schema
from avro.datafile import DataFileReader, DataFileWriter
from avro.io import DatumReader, DatumWriter
schema = avro.schema.Parse(open("user.avsc","rb").read())
schema_1=schema.meta
print(schema_1)发布于 2019-04-08 12:55:14
您是否正在尝试读取架构(user.avsc)中的字段?如果是这样的话: schema将是avsc文件中所有字段的列表,对于schema中的每个字段,each.name将提供字段列表。
希望这能帮上忙。
https://stackoverflow.com/questions/50975360
复制相似问题