Last active
September 13, 2018 19:33
-
-
Save magic-lantern/9fdd136c3add239e69de7ca00e248bde to your computer and use it in GitHub Desktop.
Example of using R to pull data from BigQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages('bigrquery') | |
library('bigrquery') | |
project <- "sandbox-nlp" # put your project ID here | |
sql <- "SELECT * | |
FROM `sandbox-nlp.MIMIC3_V1_4.ADMISSIONS` | |
LIMIT 100" | |
gbq_cursor <- bq_project_query(project, sql) | |
result <- bq_table_download(gbq_cursor) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment