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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 984 views
  • 0 likes
  • 2 in conversation