Re: [mart-dev] MartBuilder question

2007-05-24 Thread Richard Holland
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello. Yes, I know BioSQL well! :) The script 'create' statements are of the form: create X as select Y from Z; These statements will therefore create tables and simultaneously populate them. In order to do this, the script requires full read per

Re: [mart-dev] MartBuilder question

2007-05-24 Thread Brian Osborne
Richard, So the SQL file's name is bioseqdbmart.sql, the source is bioseqdb and the mart or target is bioseqdbmart. OK, so: psql bioseqdbmart postgres < bioseqdbmart.sql might not work, I should be logged in. Let's log in... Hmm. I see: bioseqdbmart=# \i bioseqdbmart.sql psql:bioseqdbmart.sql:

Re: [mart-dev] MartBuilder question

2007-05-24 Thread Brian Osborne
Richard, I think I see the problem, not a surprising one. Biosql's Postgres script does not create a schema within the Biosql database, you're just populating the db with tables. Within MartBuilder you must specify a schema, entering database as 'bioseqdb' and schema as 'bioseqdb' does not work ('

Re: [mart-dev] MartBuilder question

2007-05-24 Thread Richard Holland
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The public thing is interesting. When you originally connected MartBuilder to your source schema, I'm assuming you used database=postgres and schema=bioseqdb? What target schema did you give it when you asked it to generate the SQL? Was is bioseqdbma

Re: [mart-dev] MartBuilder question

2007-05-24 Thread Guðmundur Árni Þórisson
Richard, if I may pitch in a question: can one use MartBuilder to pull data out of say PostgreSQL and create + load into a mart in MySQL? The answer might be in the manual somewhere but I'm sure you have the quick answer! It's possible I might for my project end up having the master data

Re: [mart-dev] MartBuilder question

2007-05-24 Thread Richard Holland
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello. The quick answer is 'no'. The slightly longer answer is because it builds marts by executing 'create X as select Y from Z' statements against a single database - and so both source and target schemas need to be living in the database for this

Re: [mart-dev] MartBuilder question

2007-05-25 Thread Arek Kasprzyk
On 25 May 2007, at 11:08, Richard Holland wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 To be honest I'm not a Postgres expert. From what I understand 'public' is some kind of special schema that shouldn't normally be used, but I might be wrong! 'public' is just a default postgress s

Re: [mart-dev] MartBuilder question

2007-05-25 Thread Richard Holland
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 To be honest I'm not a Postgres expert. From what I understand 'public' is some kind of special schema that shouldn't normally be used, but I might be wrong! Let me know how you get on with trying to do this within a non-public schema. cheers, Richar

Re: [mart-dev] MartBuilder question

2007-05-25 Thread Richard Holland
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I think it might actually just boil down to permissions. Whilst logged in as the bioseqdbmart user can you do a select against any table in the public schema? If not, then there lies the problem. (Certainly in Oracle permissions need to be granted on

Re: [mart-dev] MartBuilder question

2007-05-25 Thread Guðmundur Árni Þórisson
Of course, of course (silly me!). However, it may prove useful to have MBuilder optionally produce the table-definition SQL + SQL- script to dump out the data to textfiles, to support heterogenous db- engine setups. The tables could then be created in the target database and textfiles subseq

Re: [mart-dev] MartBuilder question

2007-05-25 Thread Richard Holland
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hmmm interesting idea. I'll certainly think about it. cheers, Richard Guðmundur Árni Þórisson wrote: > Of course, of course (silly me!). However, it may prove useful to have > MBuilder optionally produce the table-definition SQL + SQL-script to

Re: [mart-dev] MartBuilder question

2007-05-25 Thread Brian Osborne
Richard, You may be right, but it appears that there is more than one way to solve this. Now I can build the Biosql database with a specific schema and connect to it in MartBuilder (e.g. "bioseqdb" and "biosql", no need to use the "public" schema). The mart SQL script that's created by MartBuild

Re: [mart-dev] MartBuilder question

2007-05-26 Thread Brian Osborne
Richard, I certainly did not set out with Biomart with the idea of learning more about Postgres but that seems to be what's happening. That's life. I've added a few lines to Biosql's Postgres script that allows you to create Biosql in a specified schema, and I've modified that load_taxonomy.pl sc