title: LOAD DATA INFILE - mySQL Error Code: 1261. Row 1 doesn't contain data for all columns
body: <p>I am leveraging LOAD DATA INFILE to import a massive CSV file (~30 GB). There are some fields with no data and as a result I'm getting the following error code:</p>
  
  <pre><code>Error Code: 1261. Row 1 doesn't contain data for all columns
  </code></pre>
  
  <p>I would rather not try and edit the CSV file first due to its size. I had tried recreating the table with DEFAULT NULL for the column with the blank fields however I'm still getting the same error. Appreciate any help for a work-around on this.</p>
  
  <p>Here is the create table</p>
  
  <pre><code>#c.execute("CREATE TABLE dns_part2_b (date VARCHAR(15), time VARCHAR(25), ip1 VARCHAR(20), ip2 VARCHAR(20), dns VARCHAR(150), arec VARCHAR(10), wsa VARCHAR(10) DEFAULT NULL)")
  </code></pre>
  
  <p>And the LOAD DATA command</p>
  
  <pre><code>LOAD DATA INFILE '/Volumes/data/mycsv.csv' INTO TABLE dns_part2_b FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES;
  </code></pre>
  
  <p>this is an example of an incomplete record:</p>
  
  <pre><code>date,time,ip1,ip2,dns,arec,wsa
  2013-07-01,00:00:14.301038+00:00,1.1.1.1,2.2.2.2,domain.com,A
  </code></pre>
  
  <p>and a complete one</p>
  
  <pre><code>date,time,ip1,ip2,dns,arec,wsa
  2013-07-01,00:00:12.335246+00:00,2.2.2.2,1.1.1.1,WPAD,NB,(WS)
  </code></pre>
  
  <p>thanks!</p>