Releases: r-dbi/bigrquery
bigrquery 1.5.1
bigrquery 1.5.0
Major changes
-
bigrquery is now MIT licensed (#453).
-
Deprecated functions (i.e. those not starting with
bq_
) have been
removed (#551). These have been superseded for a long time and were formally
deprecated in bigrquery 1.3.0 (2020). -
bq_table_download()
now returns unknown fields as character vectors.
This means that BIGNUMERIC (#435) and JSON (#544) data is downloaded into
R for you to process as you wish.It now parses dates using the clock package. This leads to a considerable
performance improvement (#430) and ensures that dates prior to 1970-01-01 are
parsed correctly (#285).
Significant DBI improvements
-
bigquery datasets and tables will now appear in the connection pane when
usingdbConnect
(@meztez, #431). -
dbAppendTable()
(#539),dbCreateTable()
(#483), anddbExecute
(#502)
are now supported. -
dbGetQuery()
/dbSendQuery()
gains support for parameterised queries via
theparams
argument (@byapparov, #444). -
dbReadTable()
,dbWriteTable()
,dbExistsTable()
,dbRemoveTable()
,
anddbListFields()
now all work withDBI::Id()
(#537).
Significant dbplyr improvements
-
bigrquery now uses 2nd edition of dbplyr interface (#508) and is
compatible with dbplyr 2.4.0 (#550). -
Joins now work correctly across bigrquery connections (#433).
-
grepl(pattern, x)
is now correctly translated to
REGEXP_CONTAINS(x, pattern)
(#416). -
median()
gets a translation that works insummarise()
and a clear
error if you use it inmutate()
(#419). -
tbl()
now works with views (#519), including the views found in the
INFORMATION_SCHEMA
schema (#468). -
tbl(con, sql("..."))
now works robustly once more (#540), fixing the
"URL using bad/illegal format or missing URL" error. -
runif(n())
gains a translation so thatslice_sample()
can work
(@mgirlich, #448).
Minor improvements and bug fixes
-
Google API URLs have been aligned with the Google Cloud Discovery docs. This
enables support for Private and Restricted Google APIs configurations
(@husseyd, #541) -
Functions generally try to do a better job of telling you when you've
supplied the wrong type of input. Additionally, if you supplySQL()
to
a query, you no longer get a weird warning (#498). -
If
bq_job_wait()
receives a 503 response, it now waits for 2 seconds and
tries again (#535). -
dbFetch()
now respects thequiet
setting from the connection (#463). -
dbGetRowCount()
anddbHasComplete()
now return correct values when you
try to fetch more rows than actually exist (#501). -
New
dbQuoteLiteral()
method for logicals reverts breaking change introduced
by DBI 1.1.2 (@meztez, #478). -
dbWriteTable()
now correct uses thebilling
value set in the
connection (#486).
bigrquery 1.4.2
-
Sync up with the current release of gargle (1.4.0). Recently gargle
introduced some changes around OAuth and bigrquery is syncing with up that:bq_oauth_client()
is a new function to replace the now-deprecated
bq_oauth_app()
.- The new
client
argument ofbq_auth_configure()
replaces the
now-deprecatedclient
argument. - The documentation of
bq_auth_configure()
emphasizes that the preferred
way to "bring your own OAuth client" is by providing the JSON downloaded
from Google Developers Console.
-
op_table.lazy_select_query()
now returns a string instead of a list, which
fixes an error seen when printing or using functions likehead()
or
dplyr::glimpse()
(@clente, #509).
bigrquery 1.4.1
bigrquery 1.4.0
-
bq_table_download()
has been heavily refactored (#412):- It should now return the requested results, in full, in most situations.
However, when there is a "row shortage", it throws an error instead of
silently returning incomplete results. - The
max_results
argument has been deprecated in favor ofn_max
, which
reflects what we actually do with this number and is consistent with the
n_max
argument elsewhere, e.g.,readr::read_csv()
. - The default value of
page_size
is no longer fixed and, instead, is
determined empirically. Users are strongly recommended to let bigrquery
selectpage_size
automatically, unless there's a specific reason to do
otherwise.
- It should now return the requested results, in full, in most situations.
-
The
BigQueryResult
object gains abilling
slot (@meztez, #423). -
collect.tbl_BigQueryConnection()
honours thebigint
field found in a connection object created withDBI::dbConnect()
and passesbigint
along tobq_table_download()
. This improves support for 64-bit integers when reading BigQuery tables with dplyr syntax (@zoews, #439, #437).
bigrquery 1.3.2
-
BigQuery
BYTES
andGEOGRAPHY
column types are now supported via
the blob and
wk packages, respectively
(@paleolimbot, #354, #388). -
When used with dbplyr >= 2.0.0, ambiguous variables in joins will get
suffixes_x
and_y
(instead of.x
and.y
which don't work with
BigQuery) (#403). -
bq_table_download()
works once again with large row counts
(@gjuggler, #395). Google's API has stopped acceptingstartIndex
parameters with scientific formatting, which was happening for large
values (>1e5) by default. -
New
bq_perform_query_dry_run()
to retrieve the estimated cost of
performing a query (@Ka2wei, #316).
bigrquery 1.3.1
- Now requires gargle 0.5.0
bigrquery 1.3.0
-
Old functions (not starting with
bq_
) are deprecated (@byapparov, #335) -
When
bq_perform_*()
fails, you now see all errors, not just the first (#355). -
bq_perform_query()
can now execute parameterised query with parameters
ofARRAY
type (@byapparov, #303). Vectors of length > 1 will be
automatically converted toARRAY
type, or usebq_param_array()
to
be explicit. -
bq_perform_upload()
works once again (#361). It seems like the generated
JSON was always incorrect, but Google's type checking only recently become
strict enough to detect the problem. -
dbExecute()
is better supported. It no longer fails with a spurious
error for DDL queries, and it returns the number of affected rows for
DML queries (#375). -
dbSendQuery()
(and hencedbGetQuery()
) andcollect()
passes on...
tobq_perform_query()
.collect()
gainspage_size
andmax_connection
arguments that are passed on tobq_table_download()
(#374). -
copy_to()
now works with BigQuery (although it doesn't support temporary
tables so application is somewhat limited) (#337). -
str_detect()
now correctly translated toREGEXP_CONTAINS
(@jimmyg3g, #369). -
Error messages inlude hints for common problems (@deflaux, #353).
bigrquery 1.2.0
Auth from gargle
bigrquery's auth functionality now comes from the gargle package, which provides R infrastructure to work with Google APIs, in general. The same transition is underway in several other packages, such as googledrive. This will make user interfaces more consistent and makes two new token flows available in bigrquery:
- Application Default Credentials
- Service account tokens from the metadata server available to VMs running on GCE
Where to learn more:
- Help for
bq_auth()
all that most users need - details for more advanced users
Changes that a user will notice
OAuth2 tokens are now cached at the user level, by default, instead of in .httr-oauth
in the current project. The default OAuth app has also changed. This means you will need to re-authorize bigrquery (i.e. get a new token). You may want to delete any vestigial .httr-oauth
files lying around your bigrquery projects.
The OAuth2 token key-value store now incorporates the associated Google user when indexing, which makes it easier to switch between Google identities.
bq_user()
is a new function that reveals the email of the user associated with the current token.
If you previously used set_service_token()
to use a service account token, it still works. But you'll get a deprecation warning. Switch over to bq_auth(path = "/path/to/your/service-account.json")
. Several other functions are similarly soft-deprecated.
Dependency changes
R 3.1 is no longer explicitly supported or tested. Our general practice is to support the current release (3.6), devel, and the 4 previous versions of R (3.5, 3.4, 3.3, 3.2).
gargle and rlang are newly Imported.
bigrquery 1.1.1
-
Fix test failure with dbplyr 1.4.0.
-
bq_field()
can now passdescription
parameter which will be applied
inbq_table_create()
call (@byapparov, #272).