This project is not covered by Drupal’s security advisory policy.

Exposes Drupal DB tables to Views

This is a simple module which does one thing: provides an admin page for site-builders to choose which tables in a site's Drupal DB to expose to Views.

The module then loads all the fields for each chosen table and detects the data type of the field and sets appropriate views field, sort, filter, and argument filters (for example numeric, string, date, or "default").

It also looks for a primary key of the table and if one is found it sets it as the base field for a views base table and makes the table accessible to views.

If you need more robust data management needs you might try the
Data module. It has a broader focus of data management in general.

Views Expose Tables is focused on simply exposing tables in the Drupal DB to views. Any table. Its small, efficient, and requires no dependencies (other than Views). It also doesn't care if the table is "owned" by another module. Views Expose Tables makes no modifications to the tables or schema.

Use cases:

Some modules store data in tables in the Drupal DB but do not provide Views exposure. For example, we use the great module https://drupal.org/project/bot. The bot_log table is not exposed to views but it is convenient to have a view to filter and sort the log of messages.

Importing data....

Sometimes it is convenient to import data into a temporary table before importing parts and pieces to other tables. This module will allow you to make views to sort and filter the data to see exactly what you have for different field criteria.

Ideas for future development include an interface for creating Views Relationships between chosen tables. This will enable tables without a primary key to be related and exposed.

Also choosing tables or tables with fields that already exposed to views can cause some weirdness/conflict but the data is accessible.

Please make an issue in the queue for support and or ideas/suggestions.

Sponsored by Skvare, LLC

Supporting organizations: 
Development and support

Project Information

Downloads