modelname_EM_outputvarname
mymodel
. nzsql database username password select function,createdate,functionsignature from _v_function where function like '%MYMODEL%'
mymodel
.proc sql noerrorstop; connect to netezza (server=servername database=database username=username password=password); select * from connection to netezza (select function,createdate,functionsignature from _v_function where function like '%MYMODEL%'); disconnect from netezza; quit;
allmush1_intab
that
is populated with a unique integer from 1 to n. n is
the number of rows in the table.
allmush1
.
drop table allmush1_outtab; create table allmush1_outtab( id integer ,"EM_CLASSIFICATION" varchar(33) ,"EM_EVENTPROBABILITY" float ,"EM_PROBABILITY" float ); insert into allmush1_outtab( id ,"EM_CLASSIFICATION" ,"EM_EVENTPROBABILITY" ,"EM_PROBABILITY" ) select id, allmush1_em_classification("BRUISES" ,"CAPCOLOR" ,"GILLCOLO" ,"GILLSIZE" ,"HABITAT" ,"ODOR" ,"POPULAT" ,"RINGNUMB" ,"RINGTYPE" ,"SPOREPC" ,"STALKCBR" ,"STALKROO" ,"STALKSAR" ,"STALKSHA" ,"VEILCOLO") as "EM_CLASSIFICATION", allmush1_em_eventprobability("BRUISES" ,"CAPCOLOR" ,"GILLCOLO" ,"GILLSIZE" ,"HABITAT" ,"ODOR" ,"POPULAT" ,"RINGNUMB" ,"RINGTYPE" ,"SPOREPC" ,"STALKCBR" ,"STALKROO" ,"STALKSAR" ,"STALKSHA" ,"VEILCOLO") as "EM_EVENTPROBABILITY", allmush1_em_probability("BRUISES" ,"CAPCOLOR" ,"GILLCOLO" ,"GILLSIZE" ,"HABITAT" ,"ODOR" ,"POPULAT" ,"RINGNUMB" ,"RINGTYPE" ,"SPOREPC" ,"STALKCBR" ,"STALKROO" ,"STALKSAR" ,"STALKSHA" ,"VEILCOLO") as "EM_PROBABILITY" from allmush1_intab ;
select id, allmush1_em_classification ( "BRUISES" ,"CAPCOLOR" ,"GILLCOLO" ,"GILLSIZE" ,"HABITAT" ,"ODOR" ,"POPULAT" ,"RINGNUMB" ,"RINGTYPE" ,"SPOREPC") as "EM_CLASSIFICATION", from allmush1_intab ;