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
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
."
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.