Open
Description
In https://bigrquery.r-dbi.org/ I read this
library(dplyr)
natality <- tbl(con, "natality")
natality %>%
select(year, month, day, weight_pounds) %>%
head(10) %>%
collect()
and get
#> # A tibble: 10 × 4
#> year month day weight_pounds
#> <int> <int> <int> <dbl>
#> 1 2005 5 NA 7.56
#> 2 2005 6 NA 4.75
#> 3 2005 11 NA 7.37
#> 4 2005 6 NA 7.81
#> 5 2005 5 NA 3.69
#> 6 2005 10 NA 6.95
#> 7 2005 12 NA 8.44
#> 8 2005 10 NA 8.69
#> 9 2005 10 NA 7.63
#> 10 2005 7 NA 8.27
but trying to get the same using my billing project
con <- dbConnect(
bigrquery::bigquery(),
project = "publicdata",
dataset = "samples",
billing = billing
)
natality <- tbl(con, "natality")
natality |>
select(year, month, day, weight_pounds) |>
head(4)
I get
Job complete
Billed: 3.76 GB
Streamed 4 rows in 1 messages.
# Source: SQL [4 x 4]
# Database: BigQueryConnection
year month day weight_pounds
<int> <int> <int> <int>
1 2005 11 NA 8
2 2005 1 NA 8
3 2005 3 NA 7
4 2005 7 NA 7
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
Metadata
Metadata
Assignees
Labels
No labels