Skip to content
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

issues with summarise #30

Open
overmar opened this issue Feb 25, 2021 · 0 comments
Open

issues with summarise #30

overmar opened this issue Feb 25, 2021 · 0 comments

Comments

@overmar
Copy link

overmar commented Feb 25, 2021

I have the feeling that our companies version of teradata is just old and so it is going to cause problems regardless. But when I try to summarise without a group_by I always get the error

library(dplyr.teradata)
library(tdplyr)
library(bcbsncR)
con <- DBI::dbConnect(odbc::odbc(), "<internal DSN>", timeout = 10)

copy_to(con,mtcars,"mtcars", temporary = T)

tbl(con,"mtcars") %>% summarise(mean(gears))
#> Warning: Missing values are always removed in SQL.
#> Use `mean(x, na.rm = TRUE)` to silence this warning
#> This warning is displayed only once per session.
#> Error in new_result(connection@ptr, statement, immediate): nanodbc/nanodbc.cpp:1374: HY000: [Teradata][ODBC Teradata Driver][Teradata Database](-5628)Column NANA not found in temp.mtcars.

tbl(con,"mtcars") %>% summarise(mean(gears)) %>% show_query()
#> <SQL>
#> SELECT NANA, AVG("gears") AS "mean(gears)"
#> FROM "mtcars"
#> GROUP BY NANA

Created on 2021-02-25 by the reprex package (v0.3.0)

Has anyone else ever run across this problem? I can generally get around it by group_by(flag = 1) but there are times where the false grouping occurs deep in packages that I can't preempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant