mm_jobs.project | defines the project information, such as the project UUID, project variables, and the model repository URL for the project. It is recommended that you create only one observation in this data set. |
mm_jobs.emailaddr | defines the e-mail addresses for the recipients of job status and the notification flags for alert and warning notifications. |
mm_jobs.reportdef | defines the types of reports to create and the warning and alert conditions that are associated with those reports. |
mm_jobs.jobtime | defines the date and time to run the reports and a label that describes the time performance data set period. |
/**********************************************/ /* DATA step mm_jobs.project */ /* */ /* Create a data set to initialize the */ /* performance monitoring batch program */ /* project specifications */ /**********************************************/ DATA mm_jobs.project; length testDestination %150 projectuuid $36 projectpath $2000 projectAlias $50 precode $32000 isActive $1 notes $500; isActive='Y'; /**********************************************/ /* Specify the destination for the report */ /* output when the report is run in TEST mode */ /**********************************************/ testDestination='reportOutputPath'; /***********************************************/ /* Specify the project UUID */ /***********************************************/ projectuuid='projectuuid'; /************************************************/ /* Map project specification variables to */ /* macro variables */ /************************************************/ precode=' %let _MM_EventProbVar=eventProbabilityVariable; %let _MM_TargetVar=targetVariable; %let _MM_TargetEvent=targeEventValue; %let _MM_ReportDatasrc=scoreIn.dataSetName; %let _MM_KeepVars=variablesToKeep; %let _MM_DropVars=variableToDrop;'; /*************************************************/ /* Specify the URL to the project in the model */ /* repository and a description of the project */ /*************************************************/ projectPath='projectURL'; projectAlias='alternateProjectName'; run;
/****************************************************/ /* DATA mm_jobs.emailaddr */ /* */ /* Create a data set that specifies the e-mail */ /* addresses of the users who will receive job */ /* status notification as well as warnings and */ /* alerts. */ /****************************************************/ DATA mm_jobs.emailaddr; length address $50 sendAlertWarning sendJobStatus $1; address='e-mailAddress'; sendAlertWarning='Y'; sendJobStatus='N'; output; address='e-mailAddress'; sendAlertWarning='Y'; sendJobStatus='Y'; output; run;
/***************************************************/ /* DATA set mm_jobs.reportdef */ /* */ /* Create a data set that defines the report */ /* metadata and alarm thresholds for the */ /* Characteristic, Stability, and Model Assessment */ /* reporting jobs. */ /***************************************************/ DATA mm_jobs.reportdef; length reportName $20 macro $1000 alertCondition $200 warningCondition $200 isActive $1 notes $500; isActive='Y'; /*************************/ /* Characteristic Report */ /*************************/ reportName='Characteristic'; macro=' %MM_UpdateCharacteristicTable( datasrc=&_MM_ReportDatasrc, dropVars=&_MM_DropVars;'; alertCondition='alertConditions'; warningCondition='warningConditions'; output; /********************/ /* Stability Report */ /********************/ reportName='Stability'; macro=' %MM_UpdateStabilityTable( datasrc=&_MM_ReportDatasrc, keepVars=&_MM_KeepVars;'; alertCondition='alertConditions'; warningCondition='warningConditions'; output; /***************************/ /* Model Assessment Report */ /***************************/ reportName='Model Assessment'; macro=' %MM_UpdateAssessmentTable( datasrc=&_MM_ReportDatasrc);'; alertCondition='alertConditions'; warningCondition='warningConditions'; output; run;
/**************************************************/ /* DATA step mm_jobs.jobtime */ /* */ /* Define the report schedule by specifying the */ /* dates and times for each incremental reporting */ /* interval. You can schedule as many jobs as you */ /* would like. The following jobs are scheduled to*/ /* run one second before midnight on the dates */ /* listed below. */ /**************************************************/ DATA mm_jobs.jobtime; length scheduledTime $18 time $10; scheduledTime='dateTime';time='timePeriodLabel';output; run;
/* Source file name: sashelp.modelmgr.reportExample3.source */ LIBNAME mm_jobs 'c:\mm.test\report.auto'; /*********************************************/ /* DATA step mm_jobs.project */ /* */ /* Create a data set to initialize the */ /* performance monitoring report batch */ /* job project specification metadata and */ /* report precode metadata. */ /*********************************************/ DATA mm_jobs.project; length testDestination $50 projectuuid $36 projectpath $200 projectAlias $50 precode $32000 isActive $1 notes $500; isActive='Y'; /***********************************************/ /* Specify the destination path for the report */ /* and the universal unique ID for the project */ /***********************************************/ testDestination= 'c:\mm.test\report.test.output\project_123'; projectuuid= '8817ea06-0a28-0c10-0034-68f4ba396538'; /************************************************/ /* The precode section uses macro variables to */ /* map individual model metadata components */ /* to their respective variables, target event */ /* values, and data used to create the report. */ /************************************************/ precode=' %let _MM_EventProbVar=p_bad1; %let _MM_TargetVar=bad; %let _MM_TargetEvent=1; %let _MM_ReportDatasrc=scoreIn.hmeq0; %let _MM_KeepVars=p_bad1; %let _MM_DropVars=bad job; '; /************************************************/ /* Specify the path to the project and provide */ /* an Alias name for the project reports. */ /************************************************/ projectPath= 'http://myserver:8080/ModelManager/MMRoot/demo/Creditcardpromotion'; projectAlias= 'credit risk for younger customers'; run; /*************************************************/ /* DATA set mm_jobs.emailaddr */ /* */ /* Create a data set that specifies the e-mail */ /* recipient notification list, and whether to */ /* send the alert, warning, and job status */ /* notifications. */ /*************************************************/ DATA mm_jobs.emailaddr; length address $50 sendAlertWarning sendJobStatus $1; address='recipient1@mail.com'; sendAlertWarning='Y'; sendJobStatus='N'; output; address='recipient2@mail.com'; sendAlertWarning='Y'; sendJobStatus='Y'; output; run; /***************************************************/ /* DATA set mm_jobs.reportdef */ /* */ /* Create a data set that defines the report */ /* metadata and alarm thresholds for the */ /* Characteristic, Stability, and Model Assessment */ /* reporting jobs. */ /***************************************************/ DATA mm_jobs.reportdef; length reportName $20 macro $1000 alertCondition $200 warningCondition $200 isActive $1 notes $500; isActive='Y'; /*************************/ /* Characteristic Report */ /*************************/ reportName='Characteristic'; macro=' %MM_UpdateCharacteristicTable( datasrc=&_MM_ReportDatasrc, dropVars=&_MM_DropVars;'; alertCondition='p1>5 or p25>0'; warningCondition='p1>2'; output; /********************/ /* Stability Report */ /********************/ reportName='Stability'; macro=' %MM_UpdateStabilityTable( datasrc=&_MM_ReportDatasrc, keepVars=&_MM_KeepVars;'; alertCondition='outputDeviation > 0.03'; warningCondition='outputDeviation > 0.01'; output; /***************************/ /* Model Assessment Report */ /***************************/ reportName='Model Assessment'; macro=' %MM_UpdateAssessmentTable( datasrc=&_MM_ReportDatasrc);'; alertCondition=' (lift5Decay>0.15 and lift10Decay>0.12) or giniDecay>0.1 or ksDecay>0.1'; warningCondition='lift5Decay>0.05'; output; run; /**************************************************/ /* DATA step mm_jobs.jobtime */ /* */ /* Define the report schedule by specifying the */ /* dates and times for each incremental reporting */ /* interval. The jobs below are scheduled to run */ /* one second before midnight on the dates listed */ /* below. */ /* */ /* For each scheduledTime variable you need a */ /* separate DATA step to execute whose SET */ /* statement names the appropriate performance */ /* data source. */ /**************************************************/ DATA mm_jobs.jobtime; length scheduledTime $18 Time $10; scheduledTime='01OCT2011:23:59:59';time='2011Q3';output; scheduledTime='01JAN2012:23:59:59';time='2011Q4';output; scheduledTime='01APR2012:23:59:59';time='2012Q1';output; scheduledTime='01JUL2012:23:59:59';time='2012Q2';output; scheduledTime='01OCT2012:23:59:59';time='2012Q3';output; run;