How to insert data of type "point" into a postgreSQL database

Overview

This article shows you a method of inserting data of type "point" into a postgreSQL database.

Environment

Talend Studio (5.3.1)

PostgreSQL (9.2)

Symptoms/Description

You may want to insert data of type "point", such as (5.829024,44.16855), from a CSV file into a database table using a simple job composed of tFileInputDelimited → tPostgresqlOutput components. You can do this as follows:

Unfortunately, you will get a PSQLException like this:

org.postgresql.util.PSQLException: ERROR: column "point" is of type point but expression is of type character varying

Resolution

To resolve the issue, a workaround is to divide the input object into two columns and then, in an added tMap component, merge these two columns by using the following expression: