Routine with PostgreSQL not working

Five Stars

Routine with PostgreSQL not working

Hello,

 

I am using a routine which returns date type value.
I have 2 jobs where I have used the same routine.
In first job I'm using Oracle database and in second job database is PostgreSQL.
Both database connections have same data with same datatypes.
When I'm running the job with Oracle connection my routine is doing well
But when I change the connection to postgreSQL it it giving error.
Attaching the screenshots for reference.

 

Thanks,
Trupti


Accepted Solutions
Five Stars

Re: Routine with PostgreSQL not working

Hi,

PLease remove extra slashes which are not part of postgresql(e.g. routine part)
 "select * from \"DWH\".\"STG\".\"STG_TEST_TABLE\" a
 where \"a\".\"LAST_UPDATED_DATE\" >=
 TO_DATE('\"+Load_max_upaded_date.getValue(\"LOAD_DIMESION\"+\"'yyyy-MM-dd')"
 
needs to be changed with

 "select * from \"DWH\".\"STG\".\"STG_TEST_TABLE\" a
 where \"a\".\"LAST_UPDATED_DATE\" >=
 TO_DATE('"+Load_max_upaded_date.getValue("LOAD_DIMESION"+"'yyyy-MM-dd')"
 
 Thanks,
 Rajashree

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think 

---
Don't forget to give kudos when a reply is helpful.
Thanks

All Replies
Five Stars

Re: Routine with PostgreSQL not working

Hi,

PLease remove extra slashes which are not part of postgresql(e.g. routine part)
 "select * from \"DWH\".\"STG\".\"STG_TEST_TABLE\" a
 where \"a\".\"LAST_UPDATED_DATE\" >=
 TO_DATE('\"+Load_max_upaded_date.getValue(\"LOAD_DIMESION\"+\"'yyyy-MM-dd')"
 
needs to be changed with

 "select * from \"DWH\".\"STG\".\"STG_TEST_TABLE\" a
 where \"a\".\"LAST_UPDATED_DATE\" >=
 TO_DATE('"+Load_max_upaded_date.getValue("LOAD_DIMESION"+"'yyyy-MM-dd')"
 
 Thanks,
 Rajashree

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think 

---
Don't forget to give kudos when a reply is helpful.
Thanks

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch