You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{dplyr} will translate certain R queries into SQL containing IFF() calls, but this is not supported by all SQL servers (such as Azure Synapse Analytics). This can be worked around, but it is unclear to the user where they went wrong.
Sort of difficult to reproduce without your own Azure Synapse Analytics instance, so here are the generated queries. I tried to reproduce this with a SQLite database but it does not produce the same SQL which makes me wonder if it's dblyr::in_schema() (etc) related.
SELECT"q01".*, CASE WHEN ("n"=1.0) THEN 1 ELSE 0 END AS"single"FROM (
SELECT"group", COUNT(*) AS"n"FROM"dbo"."tbl"GROUP BY"group"
) "q01"
# Setup SQLite databaseconn_sqlite<- dbConnect(RSQLite::SQLite(), 'database.sqlite')
dbWriteTable(conn_sqlite, "tbl", overwrite=TRUE, data.frame(
group= c("a", "a", "b", "c")))
# Doesn't produce the same SQL as the first example
tbl(conn_sqlite, "tbl") |>
count(group) |>
mutate(single=n==1) |>
show_query()
{dplyr} will translate certain R queries into SQL containing
IFF()
calls, but this is not supported by all SQL servers (such as Azure Synapse Analytics). This can be worked around, but it is unclear to the user where they went wrong.Sort of difficult to reproduce without your own Azure Synapse Analytics instance, so here are the generated queries. I tried to reproduce this with a SQLite database but it does not produce the same SQL which makes me wonder if it's
dblyr::in_schema()
(etc) related.The text was updated successfully, but these errors were encountered: