Description Usage Arguments Examples
Returns a structure that helps you query and interact with your database.
1 2 |
hostname |
the hostname for your database (i.e. dw.muppets.com) |
port |
the port for your database (i.e. 5432 or 3309) |
username |
the username for your database (i.e. kermit) |
password |
the password for your database (i.e. supersecret) |
dbname |
the dbname for your database (i.e. dw, production, staging) |
filename |
filepath to SQLite db |
dbtype |
the dbtype for your database (postgres, mysql, sqlite, or redshift) |
profile |
the profile for your database (a connection profile) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | db <- DemoDB()
db$query("select * from Artist;")
db$tables
db$tables$Artist
db$tables$Artist$head()
db$tables$Artist$all()
db$tables$Artist$sample()
db$query("select * from Artist;")
db$find_table("A*")
db$find_column("*Id*")
## Not run:
db <-DB(username="kermit", password="rainbowconnection",
hostname="localhost", dbname="muppetdb", dbtype="postgres")
db$save_credentails(profile="muppetdb")
db <-DB(profile="mysql_local")
db$query("select * from foo limit 10;")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.