Expose Custom DB Tables to Drupal Views Error I am trying to display an already existing table to Drupal Views. This table exists within my current Drupal Database, along with my Drupal tables.
The table's name is ACCOUNT_PNL and I would like to expose the fields in this table to Drupal Views.
I've followed the instructions here, but when I go and enable this module, I get the following error from my site:
DatabaseSchemaObjectExistsException: Table &lt;em class=&quot;placeholder&quot;&gt;ACCOUNT_PNL&lt;/em&gt; already exists. in DatabaseSchema-&gt;createTable() (line 657 of /var/www/drupal7/includes/database/schema.inc).

I understand that the table already exists, but isn't the tutorial code supposed to only &quot;expose&quot; it to Views so I can then use Views to display it?
Perhaps there is an error in my understanding, any help would be appreciated.
The tutorial you linked to implements hook_schema() which means Drupal will want to take care of the table implementation for you.

I don't know this for definite but I think Views requires that the table be under Drupal's control when you're exposing custom data.

I don't know of a way to tell the installer to ignore the schema installation, so the simplest thing to do would probably be to rename the custom table temporarily, install the module (allowing Drupal to create the table), then import the data from the temp table into the newly created one.

If you then uninstall the module (not just disable), your custom table and the data will be lost so it's worth keeping a backup if you think that's likely to happen.