Search code examples
pentahokettle

kettle etl how to convert to a time data type


I have a table input and gets some data from a SQL Server table. One field has values of type time, e.g. 02:22:57.0000000, the destination table (table output ) is a PostgreSQL table and has data type of time for that field. But PDI seems think the time from the source table is of type string and generates an error.

ERROR: column "contact_time" is of type time without time zone but expression is of type character varying

I tried using select value step, but there is no time type, only date and timestamp. How should I do?


Solution

  • You can use Select Values step and in the meta-data tab, select Type as Timestamp and Format as HH:mm:ss

    This will format your string input to timestamp.

    Hope this helps :)