Panoply on BigQuery
To connect RStudio to your BigQuery data warehouse to :
-
Install the BigRQuery package. You can do this in your R environment by running the following:
install.packages("bigrquery")
-
Install the readr package . This will allow you to run SQL queries and retrieve their results directly in rStudio. You can do this in your R environment by running the following:
install.packages("readr")
-
Load the DBI library and provide the connection details as shown below:
library(DBI) con <- dbConnect( bigrquery::bigquery(), project = "<project ID>", dataset = "<dataset>", billing = "<project ID>" )
-
Run a command to query your data. For example:
dbListTables(con)
will list all the tables in the selected dataset. -
On the first time you connect, you will need to authenticate with your
dwh-panoply.io
account you created when signing up to Panoply and copy the authorization code given to you post authentication into the rStudio application.
You have successfully connected R Studio to your BigQuery data warehouse.