MongoDBLookupService

描述

Provides a lookup service based around MongoDB. Each key that is specified will be added to a query as-is. For example, if you specify the two keys, user and email, the resulting query will be { "user": "tester", "email": "tester@test.com" }. The query is limited to the first result (findOne in the Mongo documentation). If no "Lookup Value Field" is specified then the entire MongoDB result document minus the _id field will be returned as a record.

标签

lookup、mongo、mongodb、record

属性

下表列出了各项属性,其中带星号 (*) 的为必需属性。其他属性视为可选属性。该表还指出了所有默认值以及属性是否支持 NiFi 表达式语言。

显示名称

API 名称

默认值

允许值

描述

Mongo 集合名称 *

mongo-collection-name

要使用的集合的名称

Mongo 数据库名称 *

mongo-db-name

要使用的数据库名称

客户端服务 *

mongo-lookup-client-service

用于此查询服务的 MongoDB 控制器服务。

投影

mongo-lookup-projection

指定投影以限制返回字段。

查询值字段

mongo-lookup-value-field

当查询键与记录匹配时,将返回该字段的值。如果未指定,则整个 MongoDB 结果文档减去 _id 字段将作为记录返回。

架构访问策略 *

schema-access-strategy

infer

  • 使用“架构名称”属性

  • 使用“架构文本”属性

  • 根据结果推断

指定如何获取用于解读数据的架构。

架构分支

schema-branch

指定在“架构注册表”属性中查找架构时使用的分支名称。如果所选架构注册表不支持分支,则该值将被忽略。

架构名称

schema-name

${schema.name}

指定要在架构注册表属性中查找的架构的名称。

架构注册表

schema-registry

指定用于架构注册表的控制器服务

架构文本

schema-text

${avro.schema}

Avro 格式架构的文本

架构版本

schema-version

指定要在架构注册表中查找的架构版本。如果未指定,则将检索架构的最新版本。

状态管理

此组件不存储状态。

受限

此组件不受限制。

系统资源注意事项

此组件未指定系统资源注意事项。

语言: 中文