Describe and Use External Database Tables Using Data. (#864184) - Drupal

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Describe and use external database tables using Data.

If you want you to use external tables as Data tables so you can mash them up in your views and do all sorts of CRUD
provided by Data, you can use the following patch for the Views module: http://drupal.org/node/576694#comment2277558
You could then, in your settings.php, add your external tables as
$db_prefix['external_table'] = 'external_database.';

provided that the external database is accessed on the same MySQL server with the same login credentials as your
drupal database.
Your external module could then describe the external table implementing the hook_data_default hook.
Files:
Comment File

Size

Author

#27

1.32 KB

markpavlitski

1.83 KB

that0n3guy

data-external-databases-864184-27.patch
0001-started-adding-multiple-databasesupport.patch

#10
#4

864184_2.txt

457
bytes

JeremyFrench

#2

864184.patch

456
bytes

JeremyFrench

luthien commented about a year ago

#26

Try out this one: https://drupal.org/project/feeds_sql. The only scary part about using this module is the fact
that it has not been updated since 2011-12. But there is also this other module that is maintained and does
what you need: https://drupal.org/project/views_xml_backend

markpavlitski commented about a year ago


Issue summary:
Status:
Status
new

View changes
Needs work

#27

Needs review

File

Size
data-external-databases-864184-27.patch

1.32 KB

Patch attached which allows views to make use of any tables adopted from an external database.
It adds an extra metadata item which is the database the tables were adopted from.
To use it, configure schema module to point to the database you need access to, then adopt the tables as
usual. When the default views for the tables are created, they will automatically point to the correct database.

1 of 1

You might also like