PDA

View Full Version : Dates in Transform from MS Access to PostgreSQL



phancox
03-06-2006, 02:23 PM
This is my first attempt at using Kettle and I'm trying to load database tables from MS Access to PostgreSQL. Database schemas are the same in each database and I get the following error when running the transform which is a simple "Table Input" linked to a "Table Output". Column is defined as "Date/Time" in Access and "timestamp" in PostgreSQL.

ERROR: column "date_of_death" is of type timestamp without time zone but expression is of type time without time zone

Running "Preview" on the input step shows the date/time data as expected.

Removing this column simply moves the same error onto another date column. Complete log follows below.

Can anyone tell me if I'm doing something wrong or is this a bug?


2006/03/07 11:07:40 - Spoon - Logging goes to D:\tmp\spoon.41581.log
2006/03/07 11:07:40 - DBCache - Loading database cache from file: [C:\Documents and Settings\phancox\.kettle\db.cache]
2006/03/07 11:07:41 - Spoon - Main window is created.
2006/03/07 11:07:41 - Spoon - Asking for repository
2006/03/07 11:07:41 - Kettle - No repositories file found in the local directory: C:\Program Files\Kettle\repositories.xml
2006/03/07 11:07:41 - Kettle - Reading repositories XML file: C:\Documents and Settings\phancox\.kettle\repositories.xml
2006/03/07 11:07:41 - Kettle - We have 1 connections...
2006/03/07 11:07:41 - Kettle - Looking at connection #0
2006/03/07 11:07:41 - Kettle - Read connection : SportZman for Soccer
2006/03/07 11:07:41 - Kettle - We have 0 repositories...
2006/03/07 11:07:46 - Spoon - Trying to open the last file used.
2006/03/07 11:07:46 - be.ibridge.kettle.trans.TransMeta - We have 2 connections...
2006/03/07 11:07:46 - be.ibridge.kettle.trans.TransMeta - Looking at connection #0
2006/03/07 11:07:46 - be.ibridge.kettle.trans.TransMeta - Looking at connection #1
2006/03/07 11:07:46 - be.ibridge.kettle.trans.TransMeta - Reading 2 steps...
2006/03/07 11:07:46 - be.ibridge.kettle.trans.TransMeta - Looking at step #0
2006/03/07 11:07:46 - StepMeta() - looking for the right step node (Read PERSON_HISTORY)
2006/03/07 11:07:46 - StepMeta() - specifics loaded for Read PERSON_HISTORY
2006/03/07 11:07:46 - StepMeta() - end of readXML()
2006/03/07 11:07:46 - be.ibridge.kettle.trans.TransMeta - Looking at step #1
2006/03/07 11:07:46 - StepMeta() - looking for the right step node (Write PERSON_HISTORY)
2006/03/07 11:07:46 - StepMeta() - specifics loaded for Write PERSON_HISTORY
2006/03/07 11:07:46 - StepMeta() - end of readXML()
2006/03/07 11:07:46 - be.ibridge.kettle.trans.TransMeta - We have 1 hops...
2006/03/07 11:07:46 - be.ibridge.kettle.trans.TransMeta - Looking at hop #0
2006/03/07 11:07:46 - Soccer Import - nr of steps read : 2
2006/03/07 11:07:46 - Soccer Import - nr of hops read : 1
2006/03/07 11:07:47 - Spoon - check steps
2006/03/07 11:07:47 - Spoon - Clicked on Connections
2006/03/07 11:07:58 - be.ibridge.kettle.trans.TransMeta - We have 2 connections...
2006/03/07 11:07:58 - be.ibridge.kettle.trans.TransMeta - Looking at connection #0
2006/03/07 11:07:58 - be.ibridge.kettle.trans.TransMeta - Looking at connection #1
2006/03/07 11:07:58 - be.ibridge.kettle.trans.TransMeta - Reading 2 steps...
2006/03/07 11:07:58 - be.ibridge.kettle.trans.TransMeta - Looking at step #0
2006/03/07 11:07:58 - StepMeta() - looking for the right step node (Read PERSON_HISTORY)
2006/03/07 11:07:58 - StepMeta() - specifics loaded for Read PERSON_HISTORY
2006/03/07 11:07:58 - StepMeta() - end of readXML()
2006/03/07 11:07:58 - be.ibridge.kettle.trans.TransMeta - Looking at step #1
2006/03/07 11:07:58 - StepMeta() - looking for the right step node (Write PERSON_HISTORY)
2006/03/07 11:07:58 - StepMeta() - specifics loaded for Write PERSON_HISTORY
2006/03/07 11:07:58 - StepMeta() - end of readXML()
2006/03/07 11:07:58 - be.ibridge.kettle.trans.TransMeta - We have 1 hops...
2006/03/07 11:07:58 - be.ibridge.kettle.trans.TransMeta - Looking at hop #0
2006/03/07 11:07:58 - Soccer Import - nr of steps read : 2
2006/03/07 11:07:58 - Soccer Import - nr of hops read : 1
2006/03/07 11:07:58 - Spoon - Transformation opened.
2006/03/07 11:07:58 - Spoon - Excecuting transformation [Soccer Import]...
2006/03/07 11:07:58 - Soccer Import - Dispatching started for transformation [Soccer Import]
2006/03/07 11:07:58 - Soccer Import - Nr of arguments detected: 10
2006/03/07 11:07:58 - Soccer Import - I found 2 different steps to launch.
2006/03/07 11:07:58 - Soccer Import - Allocating rowsets...
2006/03/07 11:07:58 - Soccer Import - Allocating rowsets for step 0 --> Read PERSON_HISTORY
2006/03/07 11:07:58 - Soccer Import - prevcopies = 1, nextcopies=1
2006/03/07 11:07:58 - Soccer Import - Transformation allocated new rowset [Read PERSON_HISTORY.0 - Write PERSON_HISTORY.0]
2006/03/07 11:07:58 - Soccer Import - Allocated 1 rowsets for step 0 --> Read PERSON_HISTORY
2006/03/07 11:07:58 - Soccer Import - Allocating rowsets for step 1 --> Write PERSON_HISTORY
2006/03/07 11:07:58 - Soccer Import - Allocated 1 rowsets for step 1 --> Write PERSON_HISTORY
2006/03/07 11:07:58 - Soccer Import - Allocating Steps & StepData...
2006/03/07 11:07:58 - Soccer Import - Transformation is about to allocate step [Read PERSON_HISTORY] of type [TableInput]
2006/03/07 11:07:58 - Soccer Import - Step has nrcopies=1
2006/03/07 11:07:58 - Read PERSON_HISTORY.0 - distribution activated
2006/03/07 11:07:58 - Read PERSON_HISTORY.0 - Starting allocation of buffers & new threads...
2006/03/07 11:07:58 - Read PERSON_HISTORY.0 - Step info: nrinput=0 nroutput=1
2006/03/07 11:07:58 - Read PERSON_HISTORY.0 - output rel. is 1:1
2006/03/07 11:07:58 - Read PERSON_HISTORY.0 - Found output rowset [Read PERSON_HISTORY.0 - Write PERSON_HISTORY.0]
2006/03/07 11:07:58 - Read PERSON_HISTORY.0 - Finished dispatching
2006/03/07 11:07:58 - Soccer Import - Transformation has allocated a new step: [Read PERSON_HISTORY].0
2006/03/07 11:07:58 - Soccer Import - Transformation is about to allocate step [Write PERSON_HISTORY] of type [TableOutput]
2006/03/07 11:07:58 - Soccer Import - Step has nrcopies=1
2006/03/07 11:07:58 - Write PERSON_HISTORY.0 - distribution activated
2006/03/07 11:07:58 - Write PERSON_HISTORY.0 - Starting allocation of buffers & new threads...
2006/03/07 11:07:58 - Write PERSON_HISTORY.0 - Step info: nrinput=1 nroutput=0
2006/03/07 11:07:58 - Write PERSON_HISTORY.0 - Got previous step from [Write PERSON_HISTORY] #0 --> Read PERSON_HISTORY
2006/03/07 11:07:58 - Write PERSON_HISTORY.0 - input rel is 1:1
2006/03/07 11:07:58 - Write PERSON_HISTORY.0 - Found input rowset [Read PERSON_HISTORY.0 - Write PERSON_HISTORY.0]
2006/03/07 11:07:58 - Write PERSON_HISTORY.0 - Finished dispatching
2006/03/07 11:07:58 - Soccer Import - Transformation has allocated a new step: [Write PERSON_HISTORY].0
2006/03/07 11:07:58 - Local Database - New database connection defined
2006/03/07 11:07:58 - Local Database - Connected to database.
2006/03/07 11:07:58 - Read PERSON_HISTORY.0 - Connected to database...
2006/03/07 11:07:58 - Server Database - New database connection defined
2006/03/07 11:07:58 - Server Database - Connected to database.
2006/03/07 11:07:58 - Write PERSON_HISTORY.0 - Connected to database [Server Database] (commit=0)
2006/03/07 11:07:58 - Server Database - Auto commit on
2006/03/07 11:07:58 - Soccer Import - Transformation has allocated 2 threads and 1 rowsets.
2006/03/07 11:07:58 - Spoon - Started.
2006/03/07 11:07:58 - Read PERSON_HISTORY.0 - Starting to run...
2006/03/07 11:07:58 - Write PERSON_HISTORY.0 - Starting to run...
2006/03/07 11:07:59 - Read PERSON_HISTORY.0 - Signaling 'output done' to 1 output rowsets.
2006/03/07 11:07:59 - Read PERSON_HISTORY.0 - Finished reading query, closing connection.
2006/03/07 11:07:59 - Local Database - Connection to database closed!
2006/03/07 11:07:59 - Read PERSON_HISTORY.0 - Finished processing (I=255, O=0, R=0, W=255, U=0, E=0
2006/03/07 11:07:59 - Write PERSON_HISTORY.0 - Prepared statement : INSERT INTO person_history(ID, WHEN_CREATED, CREATED_BY, WHEN_UPDATED, UPDATED_BY, SALUTATION, SURNAME, FIRST_NAME, MIDDLE_NAME, ALIAS, GENDER, DATE_OF_BIRTH, DATE_OF_DEATH, MOBILE, EMAIL, USER_NAME, PASSWORD, SECRET_QUESTION, SECRET_ANSWER, PRIVACY_REQUESTED, INDIGENOUS, NON_ENGLISH_SPEAKING_BACKGROUND, HOME_ADDRESS__ID, HOME_PHONE, HOME_FAX, OCCUPATION, WORK_ADDRESS__ID, WORK_PHONE, WORK_FAX, COMMENTS, WHEN_DELETED, DELETED_BY, MEMBER_NUMBER, MEMBER__ID, DEFAULT_ASSOC__ID, EMAIL_REGO, EMAIL_ANY) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2006/03/07 11:07:59 - Write PERSON_HISTORY.0 - ERROR : Because of an error, this step can't continue:
Error inserting row into table [person_history] with values: [ID=1.0, WHEN_CREATED=2006/02/10 23:38:46.000, CREATED_BY=SportZman , WHEN_UPDATED=2006/02/15 18:01:10.000, UPDATED_BY=admin , SALUTATION=, SURNAME=xxxxxx , FIRST_NAME=xxxxx , MIDDLE_NAME=, ALIAS=, GENDER=F, DATE_OF_BIRTH=1998/01/20 00:00:00.000, DATE_OF_DEATH=, MOBILE=0412888971 , EMAIL=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx , USER_NAME=, PASSWORD=, SECRET_QUESTION=, SECRET_ANSWER=, PRIVACY_REQUESTED=Y, INDIGENOUS=, NON_ENGLISH_SPEAKING_BACKGROUND=, HOME_ADDRESS__ID=1.0, HOME_PHONE=99999999 , HOME_FAX=, OCCUPATION=, WORK_ADDRESS__ID=, WORK_PHONE=, WORK_FAX=, COMMENTS=would it be possible for Johanna to be in the same team as her sister Millie. Thankyou , WHEN_DELETED=, DELETED_BY=, MEMBER_NUMBER=, MEMBER__ID=, DEFAULT_ASSOC__ID=, EMAIL_REGO=N, EMAIL_ANY=N]

Error inserting row
ERROR: column "date_of_death" is of type timestamp without time zone but expression is of type time without time zone


2006/03/07 11:07:59 - Write PERSON_HISTORY.0 - Signaling 'output done' to 0 output rowsets.
2006/03/07 11:07:59 - Soccer Import - ERROR : Errors detected!
2006/03/07 11:07:59 - Soccer Import - Looking at step: Read PERSON_HISTORY
2006/03/07 11:07:59 - Soccer Import - Looking at step: Write PERSON_HISTORY
2006/03/07 11:07:59 - Server Database - Connection to database closed!
2006/03/07 11:07:59 - Write PERSON_HISTORY.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1
2006/03/07 11:07:59 - Spoon - The transformation has finished!!

phancox
03-06-2006, 04:21 PM
Turns out to be a problem with later versions of the PostgreSQL JDBC drivers.

postgresql-8.0-311.jdbc3.jar was being loaded from "lib/ext/" as an extension.