BookmarkSubscribeRSS Feed
aellman
Fluorite | Level 6

Hello,

 

I have a dataset that is housed in Hadoop HDFS and I would like to perform a proc genmod using this dataset.  For instance, my libname is set as 

libname dchd odbc dsn='xxx' schema='data' dbcommit=99999 insertbuff=99999 readbuff=99999;

 

I have created a dataset called 'ds' that is stored in HDFS as data.ds

 

I now want to perform genmod as follows

 

ods output Estimates=data.output  (keep=event cohort_year Label MeanEstimate MeanLowerCL MeanUpperCL);

 

proc genmod data=data.ds;

model num_event= /d=p link=log offset=log_years;

by event cohort_year;
estimate " " int 1 /exp ;
ods select modelinfo parameterestimates estimates modelfit;
run;

 

The model runs fine but when I try to store an output dataset I get this error:

 

ERROR: During insert: [Simba][ImpalaODBC] (110) Error while executing a query in Impala: [HY000] : AnalysisException: Possible loss
of precision for target table 'aellman.OUTPUTH1'. Expression 'cast(2008 as double)' (type: DOUBLE) would need to be cast to
DECIMAL(11,0) for column 'cohort_year'

 

I am running Enterprise Guide 7.12

 

Thanks.

 

Further text from log:


ERROR: During insert: [Simba][ImpalaODBC] (110) Error while executing a query in Impala: [HY000] : AnalysisException: Possible loss
of precision for target table 'aellman.OUTPUTH1'. Expression 'cast(2008 as double)' (type: DOUBLE) would need to be cast to
DECIMAL(11,0) for column 'cohort_year'
NOTE: PROCEDURE GENMOD used (Total process time):
real time 7.95 seconds
user cpu time 2.72 seconds
system cpu time 0.17 seconds
memory 10176.15k
OS Memory 34488.00k
Timestamp 10/13/2016 02:50:50 PM
Step Count 75 Switch Count 1864
Page Faults 0
Page Reclaims 0
Page Swaps 0
Voluntary Context Switches 7810
Involuntary Context Switches 43
Block Input Operations 0
Block Output Operations 0

 

2 REPLIES 2
ballardw
Super User

Did you try sending the output from genmod to a different library than the source data? I'm not sure that the model procedures' ODS OUTPUT speaks HADOOP for output

Reeza
Super User

Maybe Hadoop is different but the convention is typically libname.memname. 

 

Youre trying to do schemaname.memname 

 

I would try just using the work library for starters though. 

 

Ods output estimates=output;

 

Usually the ODS SELECT statement also precedes the proc, but not a requirement. 

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 961 views
  • 0 likes
  • 3 in conversation