Support Questions

Find answers, ask questions, and share your expertise

How to insert or update a record in mySQL table if sourse db table name X and destination db table name Y using UpdateAttribute processor

avatar
Contributor

Hi,

How to insert or update a record in mySQL table if sourse db table name X and destination db table name Y using UpdateAttribute processor. 

I am able to achieve this if source and destination has single table but I have multiple table where source db table's names A,B and destination table's names Y,Z . I tried below condition but getting a error.

schema.name : ${${databaseName}:equalsIgnoreCase(nrpsubscriptiondb2306):and(${tableName}:equalsIgnoreCase(status)):ifElse(subscription_status,${tableName})}  

 

Error log: due to Unexpected token ':' at line 1, column 76. Query: ${${databaseName}:equalsIgnoreCase(nrpsubscriptiondb2306):and(${tableName}:equalsIgnoreCase(status)):ifElse(subscription_status,${tableName})}

 

Screenshot from 2022-07-11 17-22-43.png

 

 

 

1 ACCEPTED SOLUTION

avatar
Contributor

I got solution for this.

TableName : ${databaseName:equalsIgnoreCase("nrpsubscriptiondb2306"):and(${tableName:equalsIgnoreCase("status")}):ifElse("subscription_status",${databaseName:equalsIgnoreCase("nrpuserorgdb2306"):and(${tableName:equalsIgnoreCase("status")}):ifElse("user_org_status",${tableName})})}

View solution in original post

1 REPLY 1

avatar
Contributor

I got solution for this.

TableName : ${databaseName:equalsIgnoreCase("nrpsubscriptiondb2306"):and(${tableName:equalsIgnoreCase("status")}):ifElse("subscription_status",${databaseName:equalsIgnoreCase("nrpuserorgdb2306"):and(${tableName:equalsIgnoreCase("status")}):ifElse("user_org_status",${tableName})})}