as.Date()
now throws an error (version 2.3.2) when querying a Teradata server.
#1285
Labels
help wanted ❤️
we'd love your help!
I had a previously running code to query a Teradata server that is no longer running after updating (dbplyr, R, and odbc).
The issue seems to be related to how
as.Date()
is being translated into SQL. Usingshow_query()
, in the prior versions it came as CAST("X" AS DATE), now SELECT DATE "X" which throws an error when trying to pull the data.I know it is related to the update because the code still runs on a VM running older versions and querying the same server.
The updates are: R 4.2 to 4.3, dplyr 1.0.10 to 1.1.2, dbplyr 2.2.1 to 2.3.2, odbc 1.3.3 to 1.3.4, and DBI is the same 1.1.3.
Below are comparison of the two queries.
The old version brings
Now results in:
The latter throws an error when trying to pull the data as such:
Results in:
While I had a good suggestion for a walk around on my SO post by using
sql('CAST ("var" AS DATE)')
to replaceas.Date()
, I feel this might need to be addressed here to retainas.Date()
functionality for Teradata use. A more experience user on SO suggested that the issue might be related to this commit. I hope this helps.The text was updated successfully, but these errors were encountered: