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
Overview:
When connecting to a DB2 database using the R ODBC package on Linux, null values in a specific column are returned as unreadable characters instead of being correctly identified as NULL.
Problem Description:
A specific column in the database contains null values.
When querying the table using the R odbc package on Linux, null values are returned as unreadable characters (e.g., @oNjU) instead of NA.
This smells like an encoding issue to me. A few assorted ideas:
Do you still see this issue with encoding = "UTF-8" or encoding = "UTF-16"?
This SO post seems to suggest setting CCSID = 1252 may have resolved their issue.
odbc 1.5.0 introduced a couple encoding-related changes, and we also have some in the developmental version of the package since then. Could you attempt to run this same query with odbc 1.4.2 (install via pak::pak("r-dbi/[email protected]")) and also with the dev version pak::pak("r-dbi/odbc"), restarting R after installing in both cases?
Overview:
When connecting to a DB2 database using the R ODBC package on Linux, null values in a specific column are returned as unreadable characters instead of being correctly identified as NULL.
Problem Description:
The same query works correctly with:
Reproducible Example:
Expected Behaviour:
Null values in the column should be represented as NA in the resulting R data frame.
Observed Behavior:
Null values are returned as unreadable characters, as shown below:
Version info:
The text was updated successfully, but these errors were encountered: