Reputation: 1
I have a pipe delimited file having around 100 Million records and each records having 62 fields, I want to load this data into two Database tables having 50 and 45 columns... I just want to ask that how can i skip columns of file while writing insert.. .. some people suggest to use fillers but number of columns in my file are greater than the number of columns in my Db table,
Upvotes: 0
Views: 133
Reputation: 11355
Filler is good, you are ignoring data from file. They will be SKIPPED so you don't need that column
LOAD DATA
INFILE *
TRUNCATE INTO TABLE T
FIELDS TERMINATED BY ','
(
field1,
.
.
.
field50,
field51 FILLER,
.
.
.
field62 FILLER
)
BEGINDATA
a,b,....N
Upvotes: 1