问题描述
csvReader 属性集: enter image description here
这是我在 AvroSchemaRegistry 中创建和注册的架构
{ "命名空间": "nifi","类型": "记录","name": "用户",“领域”:[ {"name": "first_name","type": "string"},{"name": "last_name",{"name": "age","type": "int"} ] }
我在运行 apache-nifi 处理器时遇到的错误
org.apache.nifi.schema.access.SchemaNotFoundException: FlowFile did not contain appropriate attributes to determine Schema Text
解决方法
将您的 CSVReader 配置为 -
Schema Access Strategy
= Use 'Schema Name' Property
Schema Registry
= Your AvroSchemaRegistry Controller Service
Schema Name
= users
Schema Text
= let it be default value
这意味着 CSVReader 将在模式注册表中搜索指定的模式名称,因为访问策略是模式名称,我们将其传递给注册表。