-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with double columns. I need double but bigrquery brings integer to me #624
Comments
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 Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.3.3 (2024-02-29)
#> os macOS Sonoma 14.1
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz UTC
#> date 2024-11-25
#> pandoc 3.1.11 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/aarch64/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> askpass 1.2.1 2024-10-04 [1] CRAN (R 4.3.3)
#> bigrquery * 1.5.1 2024-03-14 [1] CRAN (R 4.3.1)
#> bit 4.5.0 2024-09-20 [1] CRAN (R 4.3.3)
#> bit64 4.5.2 2024-09-22 [1] CRAN (R 4.3.3)
#> brio 1.1.5 2024-04-24 [1] CRAN (R 4.3.1)
#> cli 3.6.3 2024-06-21 [1] CRAN (R 4.3.3)
#> curl 5.2.3 2024-09-20 [1] CRAN (R 4.3.3)
#> DBI 1.2.3 2024-06-02 [1] CRAN (R 4.3.3)
#> digest 0.6.37 2024-08-19 [1] CRAN (R 4.3.3)
#> dplyr 1.1.4 2023-11-17 [1] CRAN (R 4.3.1)
#> evaluate 1.0.1 2024-10-10 [1] CRAN (R 4.3.3)
#> fansi 1.0.6 2023-12-08 [1] CRAN (R 4.3.1)
#> fastmap 1.2.0 2024-05-15 [1] CRAN (R 4.3.3)
#> fs 1.6.4 2024-04-25 [1] CRAN (R 4.3.1)
#> gargle 1.5.2 2023-07-20 [1] CRAN (R 4.3.0)
#> generics 0.1.3 2022-07-05 [1] CRAN (R 4.3.0)
#> glue 1.8.0 2024-09-30 [1] CRAN (R 4.3.3)
#> htmltools 0.5.8.1 2024-04-04 [1] CRAN (R 4.3.1)
#> httr 1.4.7 2023-08-15 [1] CRAN (R 4.3.0)
#> jsonlite 1.8.9 2024-09-20 [1] CRAN (R 4.3.3)
#> knitr 1.48 2024-07-07 [1] CRAN (R 4.3.3)
#> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.3.1)
#> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.0)
#> openssl 2.2.2 2024-09-20 [1] CRAN (R 4.3.3)
#> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.3.0)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.3.0)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.3.0)
#> reprex 2.1.1 2024-07-06 [1] CRAN (R 4.3.3)
#> rlang 1.1.4 2024-06-04 [1] CRAN (R 4.3.3)
#> rmarkdown 2.28 2024-08-17 [1] CRAN (R 4.3.3)
#> rstudioapi 0.17.0 2024-10-16 [1] CRAN (R 4.3.3)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0)
#> tibble 3.2.1 2023-03-20 [1] CRAN (R 4.3.0)
#> tidyselect 1.2.1 2024-03-11 [1] CRAN (R 4.3.1)
#> utf8 1.2.4 2023-10-22 [1] CRAN (R 4.3.1)
#> vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.3.1)
#> withr 3.0.2 2024-10-28 [1] CRAN (R 4.3.3)
#> xfun 0.48 2024-10-03 [1] CRAN (R 4.3.3)
#> yaml 2.3.10 2024-07-26 [1] CRAN (R 4.3.3)
#>
#> [1] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
#>
#> ────────────────────────────────────────────────────────────────────────────── |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: