You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run a tbl(con, sql(...)), if the hand-rolled sql query contains more than 3 periods/dots, the query is rejected because bigrquery believes it should always be able to split the query on . into catalog, schema, and table names. See:
I recently upgraded to R version 4.4.0 and updated many packages, including bigrquery, dbplyr, and dplyr. When I was using bigrquery version 1.4.1, I did not encounter this issue. Rerunning my same old code under 1.5.1 gave me this error for the first time. Is this a documented breaking change, have I failed to update my packages correctly, or is this a bug?
This issue may be of interest to followers of #540.
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, union
library(dbplyr)
#> #> Attaching package: 'dbplyr'#> The following objects are masked from 'package:dplyr':#> #> ident, sql
# Does not work because there are 3 periods and hence more than 3 "pieces"
tbl(con, sql("SELECT t.id, t.tag_name, t.count FROM tags t"))
#> Error in `as_bq_table()`:#> ! `name` ("SELECT t.id, t.tag_name, t.count FROM tags t") must have 1-3#> components.
To be clear, I don't actually care about giving a table alias when selecting from a single table. I have a lot of hand-rolled SQL that I want to be able to stack dplyr verbs on top of, and the hand-rolled sql contains a lot of SELECT x.a, x.b, y.c FROM x LEFT JOIN y ON (x.a = y.a) and so on.
When I run a
tbl(con, sql(...))
, if the hand-rolled sql query contains more than 3 periods/dots, the query is rejected because bigrquery believes it should always be able to split the query on.
into catalog, schema, and table names. See:bigrquery/R/dbi-connection.R
Line 462 in 3642c14
I recently upgraded to R version 4.4.0 and updated many packages, including bigrquery, dbplyr, and dplyr. When I was using bigrquery version 1.4.1, I did not encounter this issue. Rerunning my same old code under 1.5.1 gave me this error for the first time. Is this a documented breaking change, have I failed to update my packages correctly, or is this a bug?
This issue may be of interest to followers of #540.
Created on 2024-06-07 with reprex v2.1.0
Session info
The text was updated successfully, but these errors were encountered: