Problem Note 65574: Decimal values are rounded after they are inserted into a new Databricks table via SAS/ACCESS® Interface to JDBC
When numeric decimal values are inserted into a Databricks table by using SAS/ACCESS Interface to JDBC, the inserted values might be rounded.
This issue occurs when any of the following are true:
- You use a DATA step to create and load a new Databricks table.
- You use either the SQL procedure or APPEND procedure to create and load a new Databricks table, and the numeric column has a non-date/time/datetime format.
The workaround is to create an empty table, ensuring that all non-date/time/datetime formats are removed from numeric columns. Then insert the data by using PROC SQL or PROC APPEND; an example of this workaround is shown below:
data sampleData ;
/* Create some sample data. */
UnFormatted_Number = 123.45;
Formatted_Number = 123.45;
format Formatted_Number 8.2;
put UnFormatted_Number= Formatted_Number=;
run;
libname libref JDBC
connection-options libname-options;
/* Delete the Databricks table that you want to load. */
proc delete data=libref.test;
run;
/* Create an empty Databricks table, removing any formats. */
data libref.test;
set sampleData;
/* List all numeric columns that have non-date/time/datetime formats. */
format Formatted_Number;
stop;
run;
/* Use PROC APPEND or PROC SQL to load the table. */
proc append base=libref.test data=sampleData;
run;
proc sql;
insert into libref.test select * from sampleData;
quit;
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Enterprise x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Pro 32-bit | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Pro x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 10 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 Datacenter | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Professional 32 bit | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Home Premium x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Home Premium 32 bit | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Enterprise x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Enterprise 32 bit | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2019 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2016 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Pro 32-bit | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Pro x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft® Windows® for x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Enterprise 32-bit | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Enterprise x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 Std | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 R2 Std | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Professional x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Ultimate 32 bit | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Ultimate x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
64-bit Enabled AIX | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
64-bit Enabled Solaris | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
HP-UX IPF | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Linux for x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
Solaris for x64 | 9.4_M6 | 9.4_M7 | 9.4 TS1M6 | 9.4 TS1M7 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
A DATA step and the SQL procedure can round numeric values when you create and load data into a new Databricks table via SAS/ACCESS® Interface to JDBC.
Type: | Problem Note |
Priority: | high |
Topic: | Data Management ==> Access Data Management ==> Data Sources ==> External Databases Data Management ==> Manipulation and Transformation ==> Numeric Precision SAS Reference ==> DATA Step SAS Reference ==> SQL
|
Date Modified: | 2020-05-01 12:17:00 |
Date Created: | 2020-02-18 08:53:25 |