distal-attribute
distal-attribute
distal-attribute
distal-attribute

Problems Importing with CSV

User, date Message
Written by deswamp
4 years ago
Category: Import/Export
3 posts since Sat, 02 Oct 10
Hi All

My scenario is:

1. I've exported 1 row of the database to a CSV file using Export > Export Grid Data as CSV
2. the default export settings are

Fields Separated by ;
Fields enclosed by "
lines terminated by \r\n

3. I've attempted to import using Import > Import CSV file
4. The default import settings were used:

terminated by ;
eonclosed by "
escaped by "

However, the row in my destination db is not updated. No error is showing up in the output.

I've tried every combination I can think of but no joy. I assume I'm missing something simple.



Any suggestions?? happy



Written by ansgar
4 years ago
4936 posts since Fri, 07 Apr 06
You could update to the latest build if not already done, this will give you some warnings from the server in the lower SQL log if something went wrong.

Apart from that: which line terminator was used duing import? Be sure it's also \r\n if the export did so.
Written by ansgar
4 years ago
4936 posts since Fri, 07 Apr 06
If nothing helps, please post some lines of your CSV file here so we can analyze that.
Written by deswamp
4 years ago
3 posts since Sat, 02 Oct 10
Wow, updating to the new version worked! There was a new import section "Method". I changed that to "Client parses file contents" and everything updated :)

Thanks very much anse!
Written by deswamp
4 years ago
3 posts since Sat, 02 Oct 10
I have a follow up question: What I want to do now is to set up a scheduled task that will do copy over a query automatically. I've read up on EVENTS but can this work for accessing a remote MySQL db and send the data to another?

If can answer this anse, I'll buy you a beer :)
Written by ansgar
4 years ago
4936 posts since Fri, 07 Apr 06
Yes I can answer but likely the answer won't make you happy so the beer might be lost :/

However, you can use events to schedule nearly any SQL command, and the scheduler runs on the server. That surely restricts events to the same workspace as SQL commands are restricted - the server it runs on. No remote stuff possible I'm afraid.

Without knowing what you're exactly trying to do, I think you can accomplish that using
- cronjob / Windows scheduled tasks
- a batch file which calls...
- mysql.exe

Just fetch data from one server and import it on the other host with a second call to mysql.exe
 

Please login to leave a reply, or register at first.