Question: pdInfoBuider: how to view SQL scheme?
0
gravatar for Guido Hooiveld
9.5 years ago by
Guido Hooiveld2.5k
Wageningen University, Wageningen, the Netherlands
Guido Hooiveld2.5k wrote:
Hi all, Likely an easy answer, but i just don't know: How to look at the underlying SQL scheme from e.g. the platform design info packages created by pdInfoBuilder, such as e.g. pd.mogene.1.1.st.v1?? I tried with: conn <- db(object) sql <- "DESC FROM pmfeature" dbGetQuery(conn, sql) Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: near "DESC": syntax error) but that thus doesn't work... Thanks, Guido ------------------------------------------------ Guido Hooiveld, PhD Nutrition, Metabolism & Genomics Group Division of Human Nutrition Wageningen University Biotechnion, Bomenweg 2 NL-6703 HD Wageningen the Netherlands tel: (+)31 317 485788 fax: (+)31 317 483342 internet: http://nutrigene.4t.com<http: nutrigene.4t.com=""/> email: guido.hooiveld@wur.nl [[alternative HTML version deleted]]
pdinfobuilder • 503 views
ADD COMMENTlink modified 9.5 years ago by Benilton Carvalho4.3k • written 9.5 years ago by Guido Hooiveld2.5k
Answer: pdInfoBuider: how to view SQL scheme?
0
gravatar for James W. MacDonald
9.5 years ago by
United States
James W. MacDonald51k wrote:
Hi Guido, Hooiveld, Guido wrote: > Hi all, > Likely an easy answer, but i just don't know: > How to look at the underlying SQL scheme from e.g. the platform design info packages created by pdInfoBuilder, such as e.g. pd.mogene.1.1.st.v1?? > > I tried with: > conn <- db(object) > sql <- "DESC FROM pmfeature" > dbGetQuery(conn, sql) I don't think SQL*Plus commands will necessarily work with SQLite. I also don't see an easy way from within R to get the schema, but it is easy enough directly from SQLite: sqlite> .schema pmfeature CREATE TABLE pmfeature (fid INTEGER, fsetid INTEGER REFERENCES featureSet(fsetid ), atom INTEGER, x INTEGER, y INTEGER); Best, Jim > > Error in sqliteExecStatement(con, statement, bind.data) : > RS-DBI driver: (error in statement: near "DESC": syntax error) > > but that thus doesn't work... > > Thanks, > > Guido > > ------------------------------------------------ > Guido Hooiveld, PhD > Nutrition, Metabolism & Genomics Group > Division of Human Nutrition > Wageningen University > Biotechnion, Bomenweg 2 > NL-6703 HD Wageningen > the Netherlands > tel: (+)31 317 485788 > fax: (+)31 317 483342 > internet: http://nutrigene.4t.com<http: nutrigene.4t.com=""/> > email: guido.hooiveld at wur.nl > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
ADD COMMENTlink written 9.5 years ago by James W. MacDonald51k
Answer: pdInfoBuider: how to view SQL scheme?
0
gravatar for Benilton Carvalho
9.5 years ago by
Brazil/Campinas/UNICAMP
Benilton Carvalho4.3k wrote:
you'd need to go to the cli and use sqlite directly: .schema table the following may also be useful (from R): f = function(tbl, conn) dbGetQuery(conn, gsub("TABLE", tbl, "pragma table_info (TABLE)")) tbls = dbListTables(conn) res = lapply(tbls, f, conn) names(res) = tbls b On Fri, Apr 23, 2010 at 4:51 PM, Hooiveld, Guido <guido.hooiveld at="" wur.nl=""> wrote: > Hi all, > Likely an easy answer, but i just don't know: > How to look at the underlying SQL scheme from e.g. the platform design info packages created by pdInfoBuilder, such as e.g. pd.mogene.1.1.st.v1?? > > I tried with: > conn <- db(object) > sql <- "DESC FROM pmfeature" > dbGetQuery(conn, sql) > > Error in sqliteExecStatement(con, statement, bind.data) : > ?RS-DBI driver: (error in statement: near "DESC": syntax error) > > but that thus doesn't work... > > Thanks, > > Guido > > ------------------------------------------------ > Guido Hooiveld, PhD > Nutrition, Metabolism & Genomics Group > Division of Human Nutrition > Wageningen University > Biotechnion, Bomenweg 2 > NL-6703 HD Wageningen > the Netherlands > tel: (+)31 317 485788 > fax: (+)31 317 483342 > internet: ? http://nutrigene.4t.com<http: nutrigene.4t.com=""/> > email: ? ? ?guido.hooiveld at wur.nl > > > > ? ? ? ?[[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENTlink written 9.5 years ago by Benilton Carvalho4.3k
actually, the following may suffice: dbGetQuery(conn, "select name, sql from sqlite_master where type='table'") b On Fri, Apr 23, 2010 at 5:30 PM, Benilton Carvalho <beniltoncarvalho at="" gmail.com=""> wrote: > you'd need to go to the cli and use sqlite directly: > > .schema table > > the following may also be useful (from R): > > f = function(tbl, conn) > ?dbGetQuery(conn, gsub("TABLE", tbl, "pragma table_info (TABLE)")) > tbls = dbListTables(conn) > res = lapply(tbls, f, conn) > names(res) = tbls > > b > > On Fri, Apr 23, 2010 at 4:51 PM, Hooiveld, Guido <guido.hooiveld at="" wur.nl=""> wrote: >> Hi all, >> Likely an easy answer, but i just don't know: >> How to look at the underlying SQL scheme from e.g. the platform design info packages created by pdInfoBuilder, such as e.g. pd.mogene.1.1.st.v1?? >> >> I tried with: >> conn <- db(object) >> sql <- "DESC FROM pmfeature" >> dbGetQuery(conn, sql) >> >> Error in sqliteExecStatement(con, statement, bind.data) : >> ?RS-DBI driver: (error in statement: near "DESC": syntax error) >> >> but that thus doesn't work... >> >> Thanks, >> >> Guido >> >> ------------------------------------------------ >> Guido Hooiveld, PhD >> Nutrition, Metabolism & Genomics Group >> Division of Human Nutrition >> Wageningen University >> Biotechnion, Bomenweg 2 >> NL-6703 HD Wageningen >> the Netherlands >> tel: (+)31 317 485788 >> fax: (+)31 317 483342 >> internet: ? http://nutrigene.4t.com<http: nutrigene.4t.com=""/> >> email: ? ? ?guido.hooiveld at wur.nl >> >> >> >> ? ? ? ?[[alternative HTML version deleted]] >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >> >
ADD REPLYlink written 9.5 years ago by Benilton Carvalho4.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 276 users visited in the last hour