0

Tried loading csv from a spreadsheet into MySQL Workbench using a solution found here

LOAD DATA LOCAL INFILE '/path/to/your/csv/file/model.csv' INTO TABLE test.dummy FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

The data loaded but some cells in the spreadsheet already contain new line characters. In these cases the LOAD created a new record.

Mathematics Kindergarten,Counting,"Say the number sequence 0 to 1000 forward and backward by:
- 5s, 10s or 100s, using any starting point 
- 3s, using starting points that are multiples of 3
- 4s, using starting points that are multiples of 4
- 25s, using starting points that are multiples of 25."

With a Table Like in this format:

 Course   |   Topic    | Description

The data loaded like so:

Mathematics Kindergarten   |    Counting    | "Say the number sequence 0 to 1000 forward and backward by:
- 5s, 10s or 100s, using any starting point              |                | 
- 3s, using starting points that are multiples of 3      |                | 
- 4s, using starting points that are multiples of 4      |                | 
- 25s, using starting points that are multiples of 25."  |                | 

How can I have the system recognize to load the data so that the whole cell contains the full description and it's not broke over X records.

Community
  • 1
  • 1
mcv
  • 1,380
  • 3
  • 16
  • 41

1 Answers1

0

The steps had me return to the document that I exported the CSV. I had to sanitize the data.

Find and Replace Carriage Returns and Newline Character present in cells with \n. Also found some other cells that had comma , into html number ,

This corrected the issues with the data import tool of MySQL Workbench.

mcv
  • 1,380
  • 3
  • 16
  • 41