Importing a CSV using Table Wizard

Table Wizard offers a quick & dirty way to get a csv into a Drupal mysql DB as a table. You need to start by downloading & enabling tablewizard and  schema. Make sure you choose to enable the delimited import part.

You should then be able to navigate to admin/content/tw via the content menu and upload your csv file.

If you want the table available in views, However you need to access MySQL (e.g via PHPMyAdmin)

and add a primary key column e.g.

ALTER TABLE `contacts_import` ADD `twid` INT( 12 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST ;

The table name will be the same as your view. Once you have done that flush caches & 'analyse' the table in the table wizard dashboard- you need to re-analyze & save. You can also comment on and exclude fields. Make sure to set any fields that connect to other tables as available keys