[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] MySQL on RAQ2



> First, I would try to use mysql to parse the data if at all possible.
Create
> a temp table dump the data in using INSERT FROM LOGFILE... then parse that
> into your separate tables. I would use a .sql script and then mysql -p <
> myslickscript.sql

That is pretty much the process I use.  I haven't pulled in more than 5,000
records at a time, but that many only takes about 1 second.  I create a
balnak talbe with the necessary structure then I use a text file with fields
enclosed by ' marks and each of my records ends in \n (new line code).
Here's the command I use, which implies that filename is in the same
directory as the table mytable you are loading the data into.

LOAD DATA INFILE 'filename' INTO TABLE mytable fields terminated by ','
enclosed by "'" lines terminated by '\n';

Once the data is in the table, you can execute whatever queries you desire
to clean the data or move it to separate tables based on your criteria.

Steven {steven@xxxxxxxxxxxx}