tMap and writing to PostgreSQL Interval column

One Star

tMap and writing to PostgreSQL Interval column

Hello.
I'm trying to write to an Interval column
in a PostgreSQL DB. My setup is fairly simple:
tFileInputDelimited --row1-> tMap --out1-> tPostgresqlOutput

The data I'm trying to write looks like 1:30 or 0:30,
I read it in as a string and in tMap I convert it to
time like this:
TalendDate.isDate(row1.timecol, "H:mm")
?TalendDate.parseDate("H:mm", row1.timecol)
:null

and this is what I'm trying to insert into an
Interval column in the DB.  The error I'm
getting is:

ERROR: invalid input syntax for type interval: "1970-01-01 00:00:00.000000 +02:00:00"ERROR: current transaction is aborted, commands ignored until end of transaction block

How should I write to the Interval column?
JB
One Star

Re: tMap and writing to PostgreSQL Interval column

Hello.
Furthermore, I was testing around reading data
from a table with an Interval type column and
writing it to a table of same kind:

tPostgresqlInput --row1-> tMap --out1-> tPostgresqlOutput

Reading the Interval data is fine but writing
produces the same error:
ERROR: invalid input syntax for type interval: "1970-01-01 00:30:00.000000 +02:00:00"ERROR: current transaction is aborted, commands ignored until end of transaction block

Repository schema in tPostgresqlInput and
-Output suggest Date type with 49 length
and dd-MM-yyyy pattern. The DB type is
INTERVAL.
Any solutions or suggestions?
Thanks.
JB
One Star

Re: tMap and writing to PostgreSQL Interval column

I circumvented this by creating another column in
the target table with type time without time zone
from which I UPDATE the data to type interval
column.  It works but if you know the answer, let
me know.
Thanks,
JB