cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle Table Partition Name as parameter

GV2019
New Contributor II

I have a child pipeline called from Pipeline Execute which is passing partition name as pipeline parameter
to Oracle-Execute snap
Oracle-Execute has a sql =>
“select * from obia1.sales_invoice_lines partition (” + _partName + “) where rownum < 11”
the value of parameter is not substituted in sql statement before it is executed
It fails with error =>
Failure: SQL operation failed, Reason: error occurred during batching: ORA-00972: identifier is too long , error code: 17081, Resolution: Please check for valid Snap properties and input data.

1 ACCEPTED SOLUTION

GV2019
New Contributor II

eval did not work for me
I solved it by adding a mapper in front of oracle-execute and mapped parameters to mapper output and used the mapper output in the sql and it worked
My new select statement is
“select * from obia1." + $tableName + " partition (” + $partName + “) where rownum < 11”
$tableName and $partName are outputs from mapper

View solution in original post

2 REPLIES 2

bmoturu
New Contributor

Hi, Try using eval function.

GV2019
New Contributor II

eval did not work for me
I solved it by adding a mapper in front of oracle-execute and mapped parameters to mapper output and used the mapper output in the sql and it worked
My new select statement is
“select * from obia1." + $tableName + " partition (” + $partName + “) where rownum < 11”
$tableName and $partName are outputs from mapper