Skip to content

Instantly share code, notes, and snippets.

@magic-lantern
Last active September 13, 2018 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magic-lantern/9fdd136c3add239e69de7ca00e248bde to your computer and use it in GitHub Desktop.
Save magic-lantern/9fdd136c3add239e69de7ca00e248bde to your computer and use it in GitHub Desktop.
Example of using R to pull data from BigQuery
# 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