Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels