title: mongoimport csv with headerline and datatype
body: <p>I'm trying to import a csv into mongodb using the following command:</p>
  
  <blockquote>
    <p>mongoimport --db users --collection contacts --file data.csv
    --headerline</p>
  </blockquote>
  
  <p>The database exists but not the collection, I want to create it and use the first row of the csv as the field names.  Why am I getting error:</p>
  
  <blockquote>
    <p>error validating settings: must specify --fields, --fieldFile or
    --headerline to import this file type</p>
  </blockquote>
  
  <p>I also would like to know:</p>
  
  <ul>
  <li>how to copy/import data from one collection into another (basically
  the syntax) </li>
  <li>how datatypes from csv are handled in mongodb when
  imported; do I need to specify datatypes for headers or will mongodb
  read it from csv types?</li>
  </ul>