From: | "David Johnston" <polobo(at)yahoo(dot)com> |
---|---|
To: | "'Rich Shepard'" <rshepard(at)appl-ecosys(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Finding Errors in .csv Input Data |
Date: | 2011-02-23 14:38:23 |
Message-ID: | 015a01cbd367$5368cb20$fa3a6160$@yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Why does your transformed data repeat the first 5 columns out the original
CSV?
Why do values within a given field end up on different lines (e.g., SIERRA
MANOR, 39.44)?
Basically, your transform output as presented makes no sense to me; I don't
even see how you could import any records into Postgres if they have that
structure.
Why can you not just import the CSV as generated by Access?
Ignoring the repeating "header" and the line-wrapping the following
differences appears:
Missing a null/blank field between "KAIPER, R L" and "SIERRA MANOR"
Missing a null/blank field between "SIERRA MANOR" and "11/15/1948"
Thus everything after "SIERRA MANOR" is off-by-two in column position
(SIERRA MANOR itself of off by 1) which seems to match what you are seeing
during the import. You can add a "|" in those two locations and the record
should then import.
Repeat for all other records.
David J.
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Rich Shepard
Sent: Wednesday, February 23, 2011 9:11 AM
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Finding Errors in .csv Input Data
Each of the 80 rows have extra columns, at least one.
Here are the same two rows from the original .csv export and the
transformation:
68670,724,"",0,,11/27/1948,"D","N","N","","H","C","32031","087","N18","18N",
"E20","20E","07","","","","MD",39.44,119.77,"NV003","M","KAIPER, R
L","","","","SIERRA
MANOR","","",11/15/1948,"D","",,106,,"",106,6.62,0,60,102,1,12.00,,30.00,,,"
B","G","G","AIR COMPRESSOR TESTED 30 GPM ALSO","","3","MEL MEYER","RT 1 BOX
10RENO,",,3,"NV003","JSWINGHOLM",1/16/2003,"",,"F",11/11/1948,,,261013.36,43
69139.23
68670|724||0||11/27/1948|D|N|N||H|C|32031|087|N18|18N|E20|20E|07||||MD|3
68670|724||0||9.44|119.77|NV003|M|KAIPER, R L|||SIERRA
68670|724||0||MANOR||11/15/1948|D|||106|||106|6.62|0|60|102|1|12.00||30.
68670|724||0||00|||B|G|G|AIR COMPRESSOR TESTED 30 GPM ALSO||3|MEL
68670|724||0||MEYER|RT 1 BOX 10
68670|724||0||RENO|||3|NV003|JSWINGHOLM|1/16/2003|||F|11/11/1948|||26101
68670|724||0||3.36|4369139.23
When I compared the two I saw no difference. Why the latter does not want
to fit the schema I don't know.
I can send the schema again and the whole 80-row file to anyone willing
to hemp me find the problems.
Rich
--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2011-02-23 14:41:51 | Re: Finding Errors in .csv Input Data |
Previous Message | Rich Shepard | 2011-02-23 14:11:16 | Re: Finding Errors in .csv Input Data |