Open joscani opened 1 month ago
Ok. The problem is with the newest development release. If I remove package and install again with
install.packages("bigrquery")
all runs smoothly
Hello, in what version is this fixed? I experience this issue with version 1.51.
Here is a reprex using the current cran release. The column order changes and 5.0 (double) is cast to 5 (integer).
library(bigrquery)
bq_auth(path = Sys.getenv("BIGQUERY_SERVICE_ACCOUNT_JSON_PATH"))
con <- DBI::dbConnect(
bigrquery::bigquery(),
project = Sys.getenv("BIGQUERY_PROJECT_ID"),
dataset = Sys.getenv("BIGQUERY_CDM_SCHEMA")
)
schema <- Sys.getenv("BIGQUERY_SCRATCH_SCHEMA")
df <- data.frame(a = 5.4, b = 5.0)
DBI::dbRemoveTable(con, DBI::Id(schema = schema, table = "test1"))
DBI::dbWriteTable(con, DBI::Id(schema = schema, table = "test1"), value = df)
DBI::dbGetQuery(con, glue::glue("select * from {schema}.test1")) |> dplyr::tibble()
#> # A tibble: 1 × 2
#> b a
#> <int> <dbl>
#> 1 5 5.4
DBI::dbDisconnect(con)
Created on 2024-11-25 with reprex v2.1.1
In https://bigrquery.r-dbi.org/ I read this
and get
but trying to get the same using my billing project
I get
Is a problem , because I need to summarise and get target (0, 1 variable) averages for a group, and only gets 1 or 0 not te proportion.
And If I upload a dataframe like mtcars for example to a bigquery table . double columns in dataframe are changed to integer columns.
Any idea? Thanks