如果您需要将提取的实体转换为 Document AI Warehouse 属性,则需要设置或更新架构。
在通过映射设置架构之前,您需要了解 Document AI 处理器类型及其架构和实体类型。流水线会展平嵌套实体,因此您还需要为子实体创建映射。
例如,处理器 INVOICE_PROCESSOR 具有以下实体类型:
line_itemline_item/amounttotal_amount
{
"property_definitions": [
{
"name": "line_item",
"display_name": "line_item",
"is_searchable": true,
"is_filterable": true,
"text_type_options": {}
},
{
"name": "my_new_receiver_name",
"display_name": "my_new_receiver_name",
"is_searchable": true,
"is_filterable": true,
"text_type_options": {},
"schema_sources": [
{
"name": "receiver_name_in_invoice",
"processor_type": "INVOICE_PROCESSOR"
},
{
"name": "receiver_name_in_w2",
"processor_type": "FORM_W2_PROCESSOR"
}
]
}
]
}
如果您想让属性名称与实体类型保持一致,可以直接使用该名称,例如上述示例中的 line_item。如果您想将账单处理器中类型为 receiver_name_in_invoice 的所有实体以及表单 W2 处理器中类型为 receiver_name_in_w2 的所有实体转换为新名称 my_new_receiver_name,则可以在 schema_sources 字段中添加映射,如上例所示。但转换后,请使用 my_new_receiver_name 进行搜索和过滤。属性名称和 schema_source 名称应具有唯一性。