[Gmod-tripal-devel] Tripal with existing CHADO db

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Gmod-tripal-devel] Tripal with existing CHADO db

Rob Syme

Hi Triplal devs/users

We've got an existing Chado database that is used by some of our other tools which expect the chado data to be the public (defualt) schema for the database. 
Is it possible for Tripal to pull data from another database rather than creating an entirely new schema inside the drupal DB?

The page at "Home » Administer » Tripal Management » Install Chado Schema" only seems to give options to manage the internal chado schema.

Is an external db not supported (I suppose permissions etc are harder with an external db)?

-r


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Gmod-tripal-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-tripal-devel] Tripal with existing CHADO db

Stephen Ficklin-2
Hi Rob,

Yes, it is possible to have Chado living outside of the Drupal database.   In the Drupal settings.php file for your site add a separate 'chado' entry to the $db_url variable.  For example:

 $db_url = array (
      'default' => 'pgsql://fly_admin:flydemo2010@localhost/drupal_dmel',
      'chado' => 'pgsql://fly_admin:flydemo2010@localhost/chado_dmel'
   );

the 'default' entry is for your Drupal site and the 'chado' entry is for your separate Chado database.   Tripal should notice that Chado is separate and handle it accordingly.   You will not have the functionality of Chado integrated with Drupal Views and some large bulk operations (e.g. data loaders) may be a bit slower because the database has to be switched back and forth between Drupal and Chado, but it should work.   Most of the development of Tripal has been tested with the case where Chado and Drupal are in the same database so if you do encounter any problems with Chado living separately just let us know and we'll make the fixes.

Alternatively, as long as your other applications do not specifically prefix the Chado tables with the 'public' schema (e.g. public.feature, or public.featureloc), then you should be able to keep Chado in the same database as Drupal but set postgres' 'search_path' variable for the postgres user that your other applications will use.  Here are some instructions for how to do this:  http://tripal.info/node/28

Hope this helps,
Stephen

On 5/26/2013 9:18 PM, Rob Syme wrote:

Hi Triplal devs/users

We've got an existing Chado database that is used by some of our other tools which expect the chado data to be the public (defualt) schema for the database. 
Is it possible for Tripal to pull data from another database rather than creating an entirely new schema inside the drupal DB?

The page at "Home » Administer » Tripal Management » Install Chado Schema" only seems to give options to manage the internal chado schema.

Is an external db not supported (I suppose permissions etc are harder with an external db)?

-r



------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may


_______________________________________________
Gmod-tripal-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Gmod-tripal-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-tripal-devel] Tripal with existing CHADO db

Rob Syme
Thanks Stephen

The user specific 'search_path' modification is exactly what I need. I had no idea that feature existed. Thanks again!

robsyme


On Tue, May 28, 2013 at 8:58 AM, Stephen Ficklin <[hidden email]> wrote:
Hi Rob,

Yes, it is possible to have Chado living outside of the Drupal database.   In the Drupal settings.php file for your site add a separate 'chado' entry to the $db_url variable.  For example:

 $db_url = array (
      'default' => 'pgsql://fly_admin:flydemo2010@localhost/drupal_dmel',
      'chado' => 'pgsql://fly_admin:flydemo2010@localhost/chado_dmel'
   );

the 'default' entry is for your Drupal site and the 'chado' entry is for your separate Chado database.   Tripal should notice that Chado is separate and handle it accordingly.   You will not have the functionality of Chado integrated with Drupal Views and some large bulk operations (e.g. data loaders) may be a bit slower because the database has to be switched back and forth between Drupal and Chado, but it should work.   Most of the development of Tripal has been tested with the case where Chado and Drupal are in the same database so if you do encounter any problems with Chado living separately just let us know and we'll make the fixes.

Alternatively, as long as your other applications do not specifically prefix the Chado tables with the 'public' schema (e.g. public.feature, or public.featureloc), then you should be able to keep Chado in the same database as Drupal but set postgres' 'search_path' variable for the postgres user that your other applications will use.  Here are some instructions for how to do this:  http://tripal.info/node/28

Hope this helps,
Stephen


On 5/26/2013 9:18 PM, Rob Syme wrote:

Hi Triplal devs/users

We've got an existing Chado database that is used by some of our other tools which expect the chado data to be the public (defualt) schema for the database. 
Is it possible for Tripal to pull data from another database rather than creating an entirely new schema inside the drupal DB?

The page at "Home » Administer » Tripal Management » Install Chado Schema" only seems to give options to manage the internal chado schema.

Is an external db not supported (I suppose permissions etc are harder with an external db)?

-r



------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may


_______________________________________________
Gmod-tripal-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel



------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Gmod-tripal-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel