Question

Cognizant Technology Solutions
US
Last activity: 28 Sep 2020 11:17 EDT
Pega Robotics create Lookup tables in a loop using ReplaceTableAutoKey
Problem statement - Execute Oracle query 1. Query 1 returns a result set. Oracle query 2 needs to be run for each result of Query 1 (in loop). Output of Query 1 is input for Query 2.
Solution attempted : Executed OracleQuery1 and moved results into a lookup table. Iterate on output using for loop and executed OracleQuery2. Results of OracleQuery2 to be moved into a look table. ReplaceTableAutoKey is being executed on same table in a loop. I have also used Clear() before loading new results into lookup table.
Expected behavior : The lookuptable should be cleared after each iteration and results of current iteration should be loaded using ReplaceTableAutoKey.
Error: I receive an error " A column called Column 1 already belongs to this data table" in the second iteration.
Automation and error are attached.
please suggest any alternatives to this.