how to import mysql dump file data into vertica 7.2?
I have mysql dump file ..
for example test.sql and how to import test.sql data into vertica 7.2 ?
OS server : linux
vertica version : 7.2
script -> test.sql
insert into test_table ( 1, 'Ana');
insert into test_table ( 2, 'Budi);
id data type integer
name data type varchar
Thanks Before
Meliyana
0
Comments
Hi ,
1- You can run the sql as is and wait for a long time(not a good thing).
2 - Or you can export into a csv format from mysql.
3 - Export form mysql using mysqldump with --fields-terminated-by and --lines-terminated-by options.
Here is an example of a script :
- this script will dump and gzip 10 tables at a time.
This script was not written by me but i have useded many times.
4 - Or you can take the dump and extract it into a csv format file and pipe it into a stdin copy command.
Your cat would be something like:
Hope this was useful
how I can running script number 3?
whether use tools?
Hi ,
Here is how
To test for only one table run the following:
/tmp/ is where you will the output
database - is the db name
and tabename is the table you wanna export