patch adds the ability for a view definition to include a 'database' key in the base definition. the value is the key name of the database as defined in the $db_url array. if this 'database' key is defined, views will perform any queries involving the specified base table against the external database.

CommentFileSizeAuthor
view_add_external_data_source.patch1.34 KBhunmonk

Comments

hunmonk’s picture

ok, i've taken the time to construct an external view and really test this sucker. works beautifully!

merlinofchaos’s picture

Status: Needs review » Fixed

Committed. Thanks for the patch and the testing.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

easp’s picture

Sorry to re-open this comment, but I have been trying to load data from an external database and have not had success.

The database is in the $db_url array and has a key of 'main'.

What do I use in the data array to select the database?

function my_module_views_data() {
$data['external_table_name']['table']['group'] = t('User sync data');
$data['external_table_name']['table']['base']['database'] = 'main';

...

Am I on the right path?

easp’s picture

Assigned: hunmonk » Unassigned
Category: feature » support
Status: Closed (fixed) » Active

Forgot to re-open for comment above.

esmerel’s picture

Category: support » feature
Status: Active » Closed (fixed)

Please do not reopen issues that have been closed for *two years*. especially when it's a patch for a feature request. If you have a support issue, open a new issue.

niek_kloots’s picture

Any update for Views 6.x-2.16 ?