# NOT RUN {
project <- bq_test_project() # put your project ID here
sql <- "SELECT year, month, day, weight_pounds FROM [publicdata:samples.natality] LIMIT 5"
query_exec(sql, project = project)
# Put the results in a table you own (which uses project by default)
query_exec(sql, project = project, destination_table = "my_dataset.results")
# Use a default dataset for the query
sql <- "SELECT year, month, day, weight_pounds FROM natality LIMIT 5"
query_exec(sql, project = project, default_dataset = "publicdata:samples")
# }
Run the code above in your browser using DataLab