如何在informatica中获取json格式的数据?
我在平面文件中有 ID 和电子邮件,我正在使用表达式转换,创建了一个字符串数据类型的输出端口,尝试将值传递为以下
'[
{
"Id":"'||Id||'"
"email":"'||email||'"
}
]'
输出:
"[
{
"Id":"2904"
"email":"[email protected]"
}
]"
我不需要在方括号的开头和结尾处使用“”行结束后不应有多余的空格。
预期输出:
[
{
"Id":"2904"
"email":"[email protected]"
}
]
我会将此字符串作为 http 请求传递给 API Web 服务。请帮助提供所需的格式。
I have Id and email in flat file, I am using expression transformation, created an output port as string data type, trying to pass the value as below
'[
{
"Id":"'||Id||'"
"email":"'||email||'"
}
]'
output:
"[
{
"Id":"2904"
"email":"[email protected]"
}
]"
I don't need the " " at the start and end for square braces and no extra space should be there after line ends .
expected output:
[
{
"Id":"2904"
"email":"[email protected]"
}
]
I will pass this string to the API webservice as http request. Kindly help with required format.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 exp 转换中创建以下端口和逻辑。
我一步一步地完成了它们。如果您觉得方便,请将所有内容合并为一行。
编辑
var_* - 这表示这些是可变端口。
out_ - 此输出是可变端口。
In exp transformation create below ports and logic.
I did them in step by step process. if you are comfortable, pls combine all into one line.
EDIT
var_* - this denotes these are variable ports.
out_ - this output these are variable ports.