Created 07-11-2022 05:08 AM
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})}
Created 07-11-2022 07:40 AM
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})})}
Created 07-11-2022 07:40 AM
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})})}