How to import data into postgres
I have data in the below mentioned format:
<a> <b> <c>> NULL NULL
<d> <e> <f<> '1999-10-10', '2000-10-10'
<g<> <h> <i>> '300-12-12 BC', '300-01-01 BC'
<m> <l> <k<,>j> NULL NULL
<g> <k> "o,l" NULL NULL
Here a,b,c,d,e,f,g,h,i,j,k,l,m may contain any character e.g. they may
contain charaters like ',/,$,#,*,&,^,%,;,:,},{,],[, space,>,< etc
I tried to import this data into postgres using commas to separate the
four columns (by creating .csv file). However, this approach is incorrect
as
third column contains the value (<k<,>j>) and "o,'" with a comma.
The patterns which exists in my data is the 1st and 2nd column contain
data within angular brackets (<>). The third column contains data either
within quotes or within angular brackets. The fourth and fifth column
contain either NULL or dates.
Is there some way by which I may import this data into postgres
efficiently as I have about 3 Tera Byte of data. I am a complete novice at
postgres so please help
No comments:
Post a Comment