I am trying trying to use dplyr to access/manipulate a table view in Google BigQuery. However when I try to aggregate the table using dplyr functions (select, filter, etc.) I get this error:
Error: Cannot reference a SQL view in a Legacy SQL query
The code below is to illustrate what I am trying to do.
#source the table
pd = src_bigquery(project, dataset) %>%
tbl(table)
#get a aggregated view of the table that is filtered on a specific date
pdSelect = pd %>%
select(id, date) %>%
filter(date =="2017-03-15") %>%
collect()
Is there a way to not use legacy SQL when using dplyr? For example, in the Google Bigquery web UI it says "By default, BigQuery runs queries using legacy SQL. Uncheck this to run queries using BigQuery's updated SQL dialect with improved standards compliance." When I am working in that environment I typically just unselect it so it stops using legacy SQL.
Thanks for your help!