On Nov 6, 2009, at 2:52 AM, Ivan Sergio Borgonovo wrote:
Ivan, I have been using JasperETL for this purpose. But like what others say, XML is very in efficient for this task. Currently I am in the process if importing XML feeds into PostgreSQL. At first I used the ETL tool to write to the correct table by creating joins into the ETL tool. However, this slows things down quite a bit (but the process is VERY manageable). Currently I keep teh route within JasperETL as short as possible in teh following steps - load XML - remove columns I don't need - cleanup some data using a javarow - load into a staging table From there I execute a stored procedure to normalize the data (create additional records where needed in other foreign tables) and push data into production. Triggers on my production table do some additional work for tsearch2 and some other small stuff. In my case, on a 32Bit system loading a 200Mb XML file consumes 1Gb real memory. On 64Bit systems with Java 1.6 you can push this further down the road though. if you can export to CSV and import using copy into PG, I would go for that route if you can control the format of the CSV well and reliable, because detecting errors in a CSV is much harder then in XML (missing column in CSV can mess up data) Ries |