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...
The first 100 community members completing the Open Studio survey win a $10 gift voucher.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Create systems and workflow to manage clean data ingestion and data transformation.
Introduction to Talend Open Studio for Data Integration.
Test drive Talend's enterprise products.