It is no secret that many experienced SAS implementers believe that a successful and effective reporting environment requires 80% of the effort spent in preparing the data and 20% designing and implementing the visualizations to answer the business questions. This breakdown often reminds me of a popular quote: "By failing to prepare, you are preparing to fail." - Benjamin Franklin.
How does this apply to Visual Analytics and sharing Data Views and Object templates? Simple, if effort is put into creating either, or both, Data Views and Object Templates then you will want to be able to leverage these development aids in other environments without having to duplicate the effort. This could be useful if you have a DEV, UAT, PROD scenario or if you have reached out to Tech Support or another expert and the expert creates something in his/her Viya environment then wants to share that collateral back with you or another customer.
If you are unfamiliar with the capabilities of Data Views, you can review the basic features of preparing data items and creating calculated columns for reuse by other users in my blog here and then for the advanced users, you can even design an advanced report data structure as described by Steve Foerster's article on CAS Views vs Data Views here. For more detail about the benefits of Object Templates, check out my article here, which describes how you can use object templates to speed development time by saving frequently made customizations to your report objects.
How do you share Data Views and Object Templates with other Viya environments? Use Viya's export and import capabilities. My colleague, Gerry Nelson, recently put out an article about Content promotion in Viya: overview and details here. In his article, he talks about both the point-and-click method of promotion and the command line interface method. He also points out a few nuances of how Viya uses the Uniform Resource Identifier (URI) in the promotion process. So be sure to use this article as a reference for more in-depth promotion guidelines.
I will be using the point-and-click promotion method for the below screenshots. A few things to keep in mind, right now in Viya 3.4, you must be an administrator to have the ability to export and import. Also, the promotion window allows you to single select an item for promotion. You will see this below, I will be either exporting/import a single Data View or Object Template or I will be selecting a folder.
Let's get to it. First, it is important to know where Data Views and Object Templates are stored. These items are stored in the SAS Infrastructure Data Server and are available for navigation via SAS Environment Manager using the Content pane from the side navigation bar. From the top of the tree, the location is:
SAS Content > Products > SAS Visual Analytics > Resources.
From the below screenshot, you can see I have several items in here. As an administrator you will see all of the Data Views and Object Templates for all users in your environment.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
This is when you must plan your promotion strategy if you use the point-and-click approach. You can select one item at a time to Export then import into your target Viya environment. The export package will be in JSON format and will contain the URI, folder location, and a few other items. See Gerry's blog for more details.
Or you can export the entire Resources folder that will include all of the Data Views and Object Templates for that current environment.
If you use the command line interface (CLI) to create your export package, you can pick and choose the individual objects you wish to include in the export package. For more details on the CLI please refer to Gerry's blogs here:
One you have your exported package, use the target Viya environment's SAS Environment Manager to select Import from the Content pane. Then follow along with the wizard and the Data Views and Object Templates will be placed in this predefined location and available for use in your target Viya environment. Since the folder structure is included in the export package you can import at the top level of the tree without issue.
Now all of the hard work in preparing your Data Views and designing your Object Templates for reuse can be shared with other Viya
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.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.