Closed (fixed)
Project:
Table Wizard
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
16 Mar 2009 at 00:27 UTC
Updated:
15 Apr 2009 at 15:50 UTC
I"m wondering if this module could make it easy to grab info from an external DB and create a view from it?
Comments
Comment #1
mikeryanCan you be a little more explicit? You can implement a hook for copying data from an external database into your default database, and Table Wizard will make it available to views. If what you mean is to surface the data while it's still in the external database, that isn't currently supported but I'm thinking about it.
Comment #2
frankcarey commented+1 to being able to link to an external database. It would be much easier than having to import the external DB with the internal one everytime it gets updated. If the external is constantly being updated this is even more difficult.
Any ideas on how you'd get the external to link in? (i know this feature request is not trivial)
Comment #3
mikeryanIt's going to be a challenge, Views won't handle it out-of-the-box (at least, it won't let a table in an external DB be a base table) - but we need this for a current project, so we'll find a way to get it done.
Comment #4
qbnflaco commentedWould DBTNG in d7 make this easier to implement? If it is, maybe we can save time by building it with this in mind, so it doesn't have to totally rewritten for d7. Just a thought.
Comment #5
mikeryanThe dependency here is on Views, not the core database API. Moshe has picked up some ideas on how to do this, I'll be seeing what I can do with them soon.
Comment #6
mikeryanI'm actively working on supporting data from external DBs this week. Status:
I hope to have all but the last (hard) part committed within a day or two.
Comment #7
frankcarey commentedexcellent! Seems that relationships between tables of different databases wouldn't be as critical. Will the id mapping still work (or is that a migrate module thing?)
Comment #8
mikeryanRelationships between tables in different databases is critical for the project I'm being paid for right now...
The migrate module ID mapping shouldn't be affected.
I may be jumping the gun, but I've just committed a first draft of this support - I'd appreciate feedback on the behaviour and presentation. You need to define your external DB in $db_url - its tables will appear in the list. Relationships across DBs won't work at all - relationships between tables in an external DB can be created with a bit of pain:
The problem seems to be with displaying field options for fields in the second table...
Thanks.
Comment #9
mikeryanUpdate: the problem is a known bug in Views - apply the patch (#380560: Fatal error: Call to a member function get_handlers()) and joining external tables within a DB works just fine.
Comment #10
mikeryanA week without problems being reported, time to move on...