不确定您是否有答案,但我的理解是您需要在数据处理程序文档中创建多个实体选项卡,一个用于您要添加的每个新的多值字段,并指示根文档中的 ID。看这个例子: 在 DataHandler.xml 文件中:
<dataConfig>
<dataSource name="jdbc" driver="org.postgresql.Driver" url="jdbc:postgresql://localhost/bedrock" user="postgres" password="test" batchSize="1000" readOnly="true" autoCommit="false" transactionIsolation="TRANSACTION_READ_COMMITTED" holdability="CLOSE_CURSORS_AT_COMMIT" />
<document name="doc-a">
<entity name="employee-root" datasource="jdbc" pk="id" query ="
select
a.id as id,
a.name as name,
a.dept as dept,
a.jobtitle as jobtitle,
a.last_change as last_change
from employee a
"
transformer="RegexTransformer,DateFormatTransformer,TemplateTransformer">
<field column = "id" />
<field column = "name" />
<field column = "dept" />
<field column = "jobtitle" />
<entity name="employee-hobby" datasource="jdbc" query ="
select
employee_hobby as features
from employee_hobby
where employee_id = ${employee-root.id}
"
transformer="RegexTransformer,DateFormatTransformer,TemplateTransformer">
<field column = "features" />
</entity>
</entity>
</document>