如何在 DataStage 中插入带引号的值?

How to insert value with quotes in DataStage?

您好,由于源文件包含多个双引号,我一直遇到问题。

我一直在努力弄清楚它是怎么回事,我目前在转换阶段使用正则表达式

这是来源 (csv)

"Error--Setting Bp Auto Risk Classification Failed Log #216079 s#err.mba$org_struct.oe#predecessor_oe: i_oe..........................[63888] i_oe_type_id..................[6299] i_eff_date....................[18-APR-2019] i_oe_level....................[5] / ORA-20003: Severe Error on log (216078): ORA-21780: Maximum number of object durations exceeded. ORA-06512: at ""K.ERR#"""

这是我的变形金刚

Convert('"','', DSLink5.REMARK)

我用正则表达式得到的结果

错误--设置 Bp 自动风险分类失败日志 #216079 s#err.mba$org_struct.oe#predecessor_oe: i_oe....... ......[63888] i_oe_type_id ...............[6299] i_eff_date.......[2019 年 4 月 18 日] i_oe_level ..................... .........[5] / ORA-20003: 日志中出现严重错误 (216078): ORA-21780: 超过对象持续时间的最大数量。 ORA-06512: 在 K.ERR#

我想要的结果

错误--设置 Bp 自动风险分类失败日志 #216079 s#err.mba$org_struct.oe#predecessor_oe: i_oe....... ......[63888] i_oe_type_id ...............[6299] i_eff_date.......[2019 年 4 月 18 日] i_oe_level ..................... .........[5] / ORA-20003: 日志中出现严重错误 (216078): ORA-21780: 超过对象持续时间的最大数量。 ORA-06512: 在 "K.ERR#"

所以第一个尝试是将“”替换为“对吗?

Convert('""','"', DSLink5.REMARK)

如果您的源代码中也有“””,您可能想要添加更多 replace/convert 选项

幸运的是(笑)我能够通过阅读文档来解决我自己的问题。

Trim(DSLink5.REMARK, '"', "R")

这是我的解决方案。谢谢大家的帮助!