countreg countregViewStore

Edge Case: Automated Archiving with Minimal Display

Scénario de test & Cas d'usage

Business Context

A manufacturing plant automates the analysis of machine failure rates. The engineering team wants to archive the 'Model Definition' and 'Fit Summary' of their failure prediction model into CAS tables for a dashboard. Crucially, they want to suppress the visual output in the report (log) to keep the automated pipeline clean, relying solely on the output CAS tables.
Data Preparation

Simulating machine sensor data (temperature, vibration) and failure counts, introducing a few extreme values.

Copied!
1 
2DATA casuser.machine_failures;
3INPUT temp vibration failures;
4DATALINES;
5100 5 0 120 7 1 110 5 0 150 9 5 105 6 0 130 8 2 115 5 1 140 8 3;
6 
7RUN;
8 

Étapes de réalisation

1
Fit a Poisson model on the machine data and save it to 'failure_store'.
Copied!
1 
2PROC CAS;
3countreg.countregFitModel / TABLE='machine_failures', model={depVars={{name='failures'}}, effects={{vars={'temp', 'vibration'}}}}, dist='POISSON', store={name='failure_store', replace=true};
4 
5RUN;
6 
2
Run ViewStore to output specific tables (ModelInfo, FitSummary) to CAS, while attempting to minimize/control display. Note: We use viewOptions to select specific content and outputTables to save it.
Copied!
1 
2PROC CAS;
3countreg.countregViewStore / TABLE='machine_failures', instore='failure_store', viewOptions={modelDefinition=true, fitModelSummary=true}, outputTables={names={ModelInfo='archived_info', FitSummary='archived_stats', replace=true}};
4 
5RUN;
6 

Expected Result


Two new CAS tables ('archived_info' and 'archived_stats') must be created in the casuser library containing the respective model information. The action should succeed even with the minimal data set provided in the context.