BookmarkSubscribeRSS Feed
Timmy2383
Lapis Lazuli | Level 10

I am trying to publish data from our SAS environment into a remote Hadoop/Hive database (as sequence files).  I'm performing basic tests by taking some source data from our business users and using a data step to write out to the Hadoop library.

 

I'm getting errors indicating that a value at row X is out of range.

 

For example:

ERROR: Value out of range for column BUY_RT1, type DECIMAL(5, 5). Disallowed value is: 0.

The source data has a numeric format of 6.5, and the actual value is ".00000". 

 

Why is .00000 out of range? Would the format for Hadoop need to be "DECIMAL(6, 5)"?

 

I get the same error when the value is "0.09"

 

ERROR: Value out of range for column INT_RT, type DECIMAL(5, 5). Disallowed value is: 0.09

2 REPLIES 2
LinusH
Tourmaline | Level 20

Just a thought, what is the SAS format or this column?

 

"When you specify a SAS format for a DECIMAL data type with specified precision and scale, specify w.d format. w is the width of the variable (including the decimal portion, if any), the decimal point, and a potential negative sign. For example, given a column of type DECIMAL(10,0), the format is 11. Given a column of type DECIMAL(18,2), the format is 20.2."

Data never sleeps
Timmy2383
Lapis Lazuli | Level 10
According to proc contents...
Type = Num
Len = 8
Format = 6.5

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1332 views
  • 0 likes
  • 2 in conversation