I'm trying to export data from PostgreSQL
and import it into SAP Hana
. The problem which is '\n'
i.e. line breaks are getting automatically removed from the TEXT data.
Example:
A 1,750 word essay is 11 to 12 paragraphs.
A 2,000 word essay is 13 to 14 paragraphs.
A 2,500 word essay is 16 to 17 paragraphs.
A 3,000 word essay is 20 paragraphs.
Is becoming
A 1,750 word essay is 11 to 12 paragraphs.A 2,000 word essay is 13 to 14 paragraphs.A 2,500 word essay is 16 to 17 paragraphs.A 3,000 word essay is 20 paragraphs.
I'm using below commands:
PostgreSQL
\COPY table_name TO 'path\data.csv' WITH CSV DELIMITER ',';
Hana
IMPORT FROM CSV FILE path
INTO table_name
WITH RECORD DELIMITED BY '\n'
FIELD DELIMITED BY '\t'
OPTIONALLY ENCLOSED BY '"';