如何在m子4中插入用户定义的数据类型

时间:2019-08-12 11:40:53

标签: oracle esb mule4

这些是我的数据类型

 create type addressTypes as object (Street  VARCHAR2(50),
      City    VARCHAR2(25),
      State   VARCHAR2(25),
    Zip     VARCHAR2(25));

 create type person as object
 (Name     VARCHAR2(25),
Address  addressTypes);    

这是我的桌子 创建表cusdetail(       cid NUMBER,       人人   );

如何在Mule 4数据库连接器中插入

插入cusdetail(cid,Person)值(:cid,:Person)

%dw 2.0
output application/json
---
{
    cid:payload.cid,
    Person:"person" ++ "(" ++(payload.name) ++ "," ++ "addressTypes"
      ++ "(" ++ (payload.street)   ++ "," ++ 
(payload.city)  ++ "," ++  (payload.state) 
 ++ "," ++  (payload.zip) ++ ")" ++ ""

}

已用有效载荷

{
    "name":"namecheck",
    "city":"chennai",
    "zip":"123456",
    "street":"2stret",
    "state":"TN",
    "cid":"12"

 }

需要在数据库中成功插入

0 个答案:

没有答案