Community

Prefixed and non prefixed tables and hook_views_data()

I'm a newb and although I've searched long and hard I'm struggling to find a solution so apologies if this has been asked before.
I have a mix of tables in my database. All my Drupal tables are prefixed like drpl_tablename; the other tables are not. I'm trying to expose the non-prefixed tables to views through hook_views_data() but get an SQL error as the the prefix gets added to the non prefixed tablename.

I'm guessing there are several possibilities for resolving this. I looked at creating a second database connection but I'm unsure where I should select this within the module. If someone could point me in the right direction it would be very much appreciated. It's been a tad frustrating today.

Dropping the prefix isn't a solution for me unfortunately.

nobody click here