[resolved] SRID is not set properly with tPostgresqlOutput

One Star

[resolved] SRID is not set properly with tPostgresqlOutput

I have a job which read a csv file and insert all lines in a postgreSQL 9.1.8 + postgis 2.0 database.
First I used component sPostgisOutput to do the job. It worked pretty well but there was an issue which annoyed me : sPostGisOutput drop table before to recreate it. The problem is that I have a date column in csv file which must be insert in a timestamp column of the postgres table. But Talend doesn't support timestamp, so when postgis drop table, it recreate a table with date column instead of timestamp column.
I found that tPostgresOutput could handle Geometry type now. So I tried to replace sPostgis component with tPostgresOutput component, but there are none lines insert in database. I have this error instead :
"L'élément du batch 0 INSERT INTO "public"."t_measure" ("id","irsn_id","name","date_measure","value_measure","average_measure","valid","the_geom","validation") VALUES (0,1336,AGEN-IRSN - 47 ,2012-11-27 18:40:41.000000 +01:00:00,87.8,90.6179,0,GeomFromText(POINT (0.6347733736038208 44.216209411621094), 0),Validé) a été annulé. Appeler getNextException pour en connaître la cause."
With PgAdmin III, I found that insert doesn't work because SRID set is 0 instead of 4326.
But in my job, s2DPointReplacer output is with SRID "EPSG:4326" as well.
So I don't understand where is my mistake.
Do I missed some tPostgresOutput configuration?
Should I use sPostGis instead and find a way to have my timestamp as well?
Any advice will be appreciate.
PS : I'm very newby with Talend...

One Star

Re: [resolved] SRID is not set properly with tPostgresqlOutput

The problem evolved a little.
Now, I set the RFID with sProj, but I always have the error :
"L'élément du batch 0 INSERT INTO "public"."t_measure" (,"the_geom") VALUES (,GeomFromText(POINT (0.6347733736038208 44.216209411621094), 4326)) a été annulé. Appeler getNextException pour en connaître la cause."
In debug mode, I saw that query generated is
INSERT INTO "public"."t_measure" (,"the_geom") VALUES (,GeomFromText(POINT (0.6347733736038208 44.216209411621094));
So the problem is that tPostgresqlOutput didn't set simple quote arround POINT like this :
INSERT INTO "public"."t_measure" (,"the_geom") VALUES (,GeomFromText('POINT (0.6347733736038208 44.216209411621094)');
Is this a bug of tPostgresqlOutput ?
If not, what I missed to get it work ?
One Star

Re: [resolved] SRID is not set properly with tPostgresqlOutput

Finally I solved the problem by using tPostgresqlRow instead of tPostgresqlOutput.
I create my SQL insert manually after a tFlowToIterate.
One Star

Re: [resolved] SRID is not set properly with tPostgresqlOutput

Hi mpellerin
I am facing the same issue. Did you find a working solution with tPostgresqlOutput in the meantime?
I am very happy if you could attach a screenshot of your working job with tPostgresqlRow.
Many thanks in advance.
Best regards,
One Star

Re: [resolved] SRID is not set properly with tPostgresqlOutput

(suzuki takayuki)???????????????????????????????????????????????????????????????CAY(??)?2013?10?29?(?)??31?(?)????3?????????????10?31?(?)????????? 2014????????????????????????????????31???????????????CAY?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????OLAibi(????)??????????????????????CINEMA dub MONKS????????????4??????CINEMA dub MONKS?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????……??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????????????????????????2014????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????″????????″?????????????????????(????????)??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

?????? ??????
?????? ???
?????? ???
?????? ??
?????? ???????
?????? ??????
?????? ???


?????? ???????
?????? ???????
?????? ??
?????? ?? ???
?????? iphone???
?????? ?????
?????? ???
?????? ?? ??

?????? ??? ??
?????? ? ??

tory bank jp

Calling Talend Open Studio Users

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

Start the survey


Talend named a Leader.

Get your copy


Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.



Introduction to Talend Open Studio for Data Integration.


Downloads and Trials

Test drive Talend's enterprise products.