I have a MySql table called twitter_statuses
which as the title suggests holds twitter statuses. here is the table structure.
this table contains all sort of characters in the text column, and some of the column holds Ruby object which are multi lined.
Im trying to select some of the records into a file and then load them to a new table but because of all the special characters some of the rows get "messed up".
here is the query I use to dump the statuses
here is the query I use to re-load the dumped statuses
As you can see I tried replacing the commas in the text column with ****
to prevent them from splitting the fields, and replaced the new line in the multi line columns (urls
, hashtags
, user_mentions
) to prevent "cutting the line" when dumping the file to CSV.
currently the multi line fields load great (the replacement of the new line character works) my problem id with other characters that appear in other fields (all sort of character) with cause to split columns.
any ideas on what could I change there?