Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] SRID is not set properly with tPostgresqlOutput

hello,
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.
Thanks.
PS : I'm very newby with Talend...
0683p000009MAGu.jpg

Labels (2)
4 Replies
Anonymous
Not applicable
Author

Hi,
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 ?
Thanks
Anonymous
Not applicable
Author

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

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,
Christoph
Anonymous
Not applicable
Author

(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