gpt4 book ai didi

java - Talend-如何将字符串从 'MATCHING' 列替换为 'contactFirstName' 列

转载 作者:行者123 更新时间:2023-12-02 02:50:04 24 4
gpt4 key购买 nike

我遇到了一个非常棘手的情况,尚未使用 Talend 提出自己的解决方案。我有一个输入 MySql,它有许多列,当 VALUE 列包含 1;1;1 时,需要将第一个字符串从 MATCHING 列复制到 contactFirstName 列

我正在使用 tjavarow 组件。

所需描述: Click here for required description

批量设计: Click here for batch design

最佳答案

使用简单的 tMap,对输出流中的 contactFirstname 字段使用以下表达式:
row46.VALUE.equals("1;1;1") ? row46.MATCHING.replaceAll(";.*$", "") : row46.contactFirstname

这是我用于测试的 tMap 的捕获: enter image description here

希望这有帮助。
成绩单

关于java - Talend-如何将字符串从 'MATCHING' 列替换为 'contactFirstName' 列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43997269/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com