Pentaho

 View Only

 Am getting error in select values during a transformation saying that " Couldn't find field 'taking_cashout' in row! " eventhough in the previous step we defined the field taking_cashout , am currently using pentaho pdi 8.1

Pradeep Munikrishnan's profile image
Pradeep Munikrishnan posted 06-05-2023 14:07

i am executing a query in postgre sql db and then pushing that into select values where am getting the error saying that the field is not there , i have attached the log file and corresponding screenshot. can anyone help me please??

Which version of PostgreSQL JDBC use? 

i dono know how to check that in my local but my jar file says  postgresql-42.2.4.jar

 

Is column taking_cashout defined as alias, column AS taking_cashout?

yes it is alias actually, but with the same name , because our scenario is that we need to check whether the column "taking_cashout" is present in the table first using "check column exists" and then if it  Y , then we will replace the Y with the column name itself for the result variable of "check column exists"  and then assign it to a global variable using "set variables" as target_taking_cashout  and then we use the variable in the sql query as below

 

select $(target_taking_cashout) as taking_cashout from table_name, so that the target_taking_cashout will be substituted with taking_cashout if the field is present in the table or NULL if its not

Petr Prochazka's profile image
Petr Prochazka

Hi Pradeep.

Which version of PostgreSQL JDBC use? 

Is column taking_cashout defined as alias, column AS taking_cashout?