pdInfoBuider: how to view SQL scheme?
2
0
Entering edit mode
Guido Hooiveld ★ 3.9k
@guido-hooiveld-2020
Last seen 1 day ago
Wageningen University, Wageningen, the …
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 pdInfoBuilder • 1.1k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 12 hours ago
United States
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 COMMENT
0
Entering edit mode
@benilton-carvalho-1375
Last seen 4.1 years ago
Brazil/Campinas/UNICAMP
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 COMMENT
0
Entering edit mode
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 REPLY

Login before adding your answer.

Traffic: 504 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6