HomeForum
Welcome, Guest

Moving data to Postgres database
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Moving data to Postgres database

Moving data to Postgres database 1 year, 2 months ago #1837

  • Martin
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Good afternoon..

I am trying to move timestamps from an old SQL Anywhere database using an ODBC driver into a Postgres database. The Tables are identical in both databases. The timestamps are in the “YYYY-MM-DD HH:MM:SS.SSS” format. I am trying to use your Visual Importer and I have specified the from field as a char(23) in the old SQL Database as I can change the data on the fly and I have specified the postgres data field as timestamp without time zone and the field definition as above. All I am getting is the following error

“Record/Line:1 Record Rejected: Can’t apply format YYYY-MM-DD HH:MM:SS.SSS for field record_added(TIMESTAMP WITHOUT TIMEZONE) value 2006-05-23 22:34:42.096”.

I need to keep the microseconds of the timestamp….

Any suggestions???
Martin

Re: Moving data to Postgres database 1 year, 2 months ago #1838

  • admin
  • NOW ONLINE
  • Moderator
  • Posts: 2191
  • Karma: 12
can you email us table creation script for PostgresSQL database and example of your data as a text file please

Mike

Re: Moving data to Postgres database 1 year, 2 months ago #1839

  • admin
  • NOW ONLINE
  • Moderator
  • Posts: 2191
  • Karma: 12
Got all necessary data

You are using wrong date format you should be using YYYY-MM-DD HH:NN:SS.FFF

Have a look at the documentation there is a chapter describing formats supported.
Also have a look at the diagram at the beginning (2nd) it will explain the order of events

Which version have you got?
Latest standard version supports direct connection to Postgresql MySQL, Interbase
Professional and Enterprise to follow

Mike

Re: Moving data to Postgres database 1 year, 2 months ago #1840

  • George
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Karma: 0
Hi there Mike

I am using latest version of Visual Importer ETL and I cannot find any mention in the Visual Importer docs about FFF. What I see is the ZZZ for oracle time stamps. The postgres documentation does not seem to have anything about FFF either. I have tried it and all I get is the same error.

Martin

Re: Moving data to Postgres database 1 year, 2 months ago #1841

  • admin
  • NOW ONLINE
  • Moderator
  • Posts: 2191
  • Karma: 12
>>I am using latest version of Visual Importer ETL and I cannot find any mention in the Visual Importer docs about FFF. What I see is the ZZZ for oracle time stamps.

There is a mistake in documentation.

>>The postgres documentation does not seem to have anything about FFF either. I have tried it and all I get is the same error.

Important thing to understand that this format has nothing to do with your target database.

This the format of the source data.
It is there to help to covert string into datetime type inside of visual importer, so we can load it later into date or timestamp field

so if you see in the bottom grid

16/08/2009 your format is DD/MM/YYYY
1/31/2009 your format is M/D/YYYY
2006-05-23 22:34:42.096 your format is YYYY-MM-DD HH:NN:SS.FFF
1992/mar/12 00:00 your format is YYYY/MMM/DD HH:NN

Mike

Re: Moving data to Postgres database 1 year, 2 months ago #1842

  • Martin
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Hi there

Yes…. That is what I thought. No problems …..
I have corrected all the issues with all the other dates but it is just the timestamp 2006-05-23 22:34:42.096 format is YYYY-MM-DD HH:NN:SS.FFF that I am having trouble with…… Everything else is coming over correctly and very quickly (test database is over 100,000 records just in the memberships table and it is coming over in about a 1 min 30 seconds.)
If I can get around this problem you will have saved me over 3 weeks of work!

Thanks,
Martin
  • Page:
  • 1
  • 2
Time to create page: 0.21 seconds

Testimonials

Currently we are using Visual Importer Ent to import our client’s customer RMA data into our SQL server for further processing and export same data to their ftp server.

We Process 3000 files daily, 24h x 365d

C Gandhi
Nesa-Canada

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top