Import csv file into table

1,447 views
Skip to first unread message

Jeremy

unread,
Mar 1, 2009, 11:23:19 AM3/1/09
to Sequel Pro
I am trying to update the contents of a table in my db by importing a
csv file.

I have cleared the contents of the table by issuing the 'truncate
tablename' command but when I go to file, import, csv, it reads the
import but no entries are imported.

To check it is not my csv file, I exported the contents of another
table in my db to csv, truncated that table, and then tried to run an
import using the previously exported csv file but again, no line
entries are imported into the table at all.

Any help greatly appreciated.

Thanks

Jeremy

Rowan Beentje

unread,
Mar 2, 2009, 10:29:39 AM3/2/09
to seque...@googlegroups.com
Hi Jeremy,

How far does the import appear to get? There's three stages it'd be
useful to know if it executed:
1) An initial "Reading file" indeterminate (barber pole) progress bar
2) The field mapping dialog
3) The actual import progress bar

Also - if you open up the console (View menu -> Toggle console), does
it show any "INSERT" commands listed at all after importing the file?

Cheers,
Rowan
(Sequel Pro contributor)

Tony Thomas

unread,
Mar 23, 2009, 10:50:16 AM3/23/09
to Sequel Pro
I've been experiencing a similar problem. In my case, I was trying to
import a CSV file of only 244 records.

I'd get past steps 1 and 2 below. The progress bar would begin (and
console would show inserts happening) and then Sequel Pro would crash
somewhere around the 40th or 50th record. This happened over five
times in a row, even after I tried breaking the file into smaller sets
of records. Then finally, it just worked and imported the last 140 or
so records as normal.

I'm not sure if it's related or not, but when trying to import an SQL
dump from the production database into my local copy, I'm getting
crashes too.

Rowan Beentje

unread,
Mar 23, 2009, 10:55:03 AM3/23/09
to seque...@googlegroups.com
Hi Tony,

We're pretty sure the crashes people are experiencing are because the
query console just can't keep up with the import commands we're
sending, a situation which seems to have got worse with 10.5.6 (to be
fair to OS X, Sequel Pro was doing something in the wrong way).

Stuart's been working on the query console, and has reworked the
actual query logging together with a host of other improvements; with
a test version all the import crashes I could easily reproduce have
been fixed, so 0.9.5 should resolve this :)

--Rowan

Tony Thomas

unread,
Mar 24, 2009, 10:10:58 AM3/24/09
to Sequel Pro
Great! Thanks so much for continuing the development of Sequel Pro. As
someone who has used it since the early days of CocoaMySQL, I couldn't
live without it.

Tony Thomas

unread,
Mar 30, 2009, 11:26:24 AM3/30/09
to Sequel Pro
For anyone else who is experiencing this problem, I downloaded the
latest nightly build and it appears to work fine now.

http://nightly.sequelpro.com/
Reply all
Reply to author
Forward
0 new messages