Following your instructions, I noticed issues with
cases of some things, so I changed all table names to
all lowercase.
I also noticed that on MySQL 4.0 and 4.1, you can't
have a varchar(512), as the UL is 255. I changed that
to text.
Once I had the tables created, I proceeded to load up
the txt files:
mysql> load data local infile 'FOOTNOTE.txt' into
table footnotetbl FIELDS TERMINATED BY '^' ENCLOSED BY
'~' LINES TERMINATED BY '\r\n' ;
Query OK, 207 rows affected (0.02 sec)
Records: 212 Deleted: 0 Skipped: 5 Warnings: 0
mysql> load data local infile 'DATA_SRC.txt' into table
datasrctbl FIELDS TERMINATED BY '^' ENCLOSED BY '~'
LINES TERMINATED BY '\r\n' ;
Query OK, 1 row affected (0.02 sec)
Records: 366 Deleted: 0 Skipped: 365 Warnings: 366
I had warnings like crazy on the other txt files, but
these ones here have skipped records, which does
concern me.
Can you assist?
Logged In: YES
user_id=929472
Hi,
Sorry for the late response.
Thanks for the feedback.
Yeah, there are heaps of warnings when uploading the data.
This is because the datafiles provided by the USDA often skip
fields that have no data in them.
It took me a while to figure it out, but you can safely ignore all
the warnings. I will post specific info on why these warning
are generated soon. If you want I can email you directly.
Further feedback is most welcome. You can contact me
directly at conrad4peace@yahoo.com
Also, I'm currently re-testing all my database schema scripts
for MySQL (I develop with PostgreSQL).
Thanks.
Conrad
Logged In: YES
user_id=929472
I've added some help regarding the warnings when importing
the USDA data files. See File Releases -> Database.