SAS Visual Analytics: Andrew Howell What’s in it for the ANJ Solutions SAS programmer?
SAS Vis isual Analyt ytics for SAS Programmers • Loading data into Visual Analytics • Visual Tools • Programming & traditional client tools • SAS EG, SAS DI, SAS code • Running SAS code in Visual Analytics reports • Create Stored Process in Enterprise Guide • Add Stored Process in a Visual Analytics report • Note: • This presentation is not VA version-specific • All screenshots are Visual Analytics v7.3
Visual Analyt ytics Data Requirements • Data needs be to either: VA User Data Manager • Always available Manual: • Readily available Manual: -VA Explorer - VA Data Builder • Different methods for: -VA Report Designer • Visual Analytics users SAS clients: SAS clients: • Analysts - Enterprise Guide - Data Integration Studio • Report Builders - Data Integration Studio - Management Console • Admins & Data Managers VA Autoload VA Autoload VA Reload-On-Start
Loading data into Visual Analyt ytics • Two LASR servers are installed by default • LASR Analytics Server (Managed) • Public LASR Analytics Server (Flexible) • Each server has one library (plus other associated libraries) • LASR Library (Managed) – may also have associated Hadoop library for co-located data. • Public LASR Library (Flexible) – may also have associated AutoLoad library
Loading data into Visual Analyt ytics • In both cases, users can select: • Existing LASR tables, or • Self-service options: • Upload local files • Upload server-based files
Usi sing code to lo load ad data in into Vis isual l Analy lytic ics • SAS Enterprise Guide task • SAS Data Integration Studio transformation • Both simply generate SAS code 1. Load data into LASR library 2. Register LASR table in metadata
Loading data into Visual Analytics
Vis isual Analyt ytics – AutoLoad lib library • Populates a Public Library from a designated “drop folder” in disk storage • Default schedule 15 mins (once activated) • Flat files (*.csv, *.xlsx, etc) are imported, then defined & loaded into memory. • SAS tables are defined as LASR tables and loaded into memory • Other folders for appending & unloading data • SAS library defined in metadata
Running SAS code in Visual Analyt ytics • Visual Analytics has a large collection of web report objects • Bar charts, • Graphs • Geomap • etc. • When running VA report objects, these are run on the LASR server - In memory, fast. • Other non-VA content • For example, a Radar chart? • Solution: Run SAS code in VA as a Stored Process.
Run Stored Process 3. Run Stored Process from Enterprise Guide
Run Stored Process 3. Run Stored Process from Office Add-In
Run Stored Process 3. Run Stored Process from Stored Process Web Application
Add St Stored Process to Visu isual l Analy lytic ics Report rt • Open an existing report
Add St Stored Process to Visu isual l Analy lytic ics Report rt • Add Stored Process object to report
Add St Stored Process to Visu isual l Analy lytic ics Report rt • Select alternate chart type • Stored Process prompt
Summary ry • Loading data into LASR libraries • VA interface • SAS code • AutoLoad library • Running SAS code in VA reports • SAS Stored Process • Create in EG, deploy as Stored Process • Consider whether to run on Workspace Server or Stored Process Server
What is a SAS Stored Process? • “Metadata registered” SAS code • Waiting to run “on demand” by a SAS client • Metadata instructions • How to run the SAS code • Workspace Server, Stored Process Server • How to request prompt values from the SAS client • How to return results to the requesting SAS client • SAS Clients • Enterprise Guide • Office Add-In (Excel, Powerpoint, Outlook, etc) • Data Integration Studio • Visual Analytics
Create a Stored Process in Enterprise Guide 1. Create a regular EG task (or code node) • Can also create a Stored Process from an entire process flow. • If requiring prompts, create these first at EG prompts • The prompt values will be passed to the SAS code as macro values 2. Register the task as a Stored Process 3. Run the Stored Process from any SAS client.
Create a Stored Process 1. Create a regular EG task (or code node) • This example – Radar Chart (“wedge” chart type)
Create Stored Process • Generated SAS code (simplified)
Create Stored Process • Create Enterprise Guide prompt(s) • This example: • Different radar types • Prompt name “ ChartType ” will populate a macro variable of the same name
Create Stored Process • Modify code to use the prompt values • Passed as macro variables • Throw in some “hand written” SAS code
Create Stored Process • Run EG task with prompt
Create Stored Process 2. Turn EG task into a Stored Process
Tips’n’Tricks • SAS Enterprise Guide Data Step Debugger • New with SAS EG v7.13 • Similar to Display Manager debugger (only better!)
Tips’n’Tricks • SAS Graphics Accelerator - Au Audible ible graphs phs!! !! • SAS 9.4M4 (to create) • Google Chrome add-in (to view) • Download from Chrome web store
Recommend
More recommend