SAS Viya - Public Sharing

To share a dashboard or report with individuals who do not have access to SAS Viya, it is essential to store the data in the Public caslib and save the report in the Public folder. Currently, caslibs can be created using SAS programming or imported interactively from your local machine or workspace. Note that this feature requires further refinement, as I have encountered difficulties exporting data into my folder.

Follow the steps below to meet the prerequisites and share your report.

Step 1: Import Data into the Public Caslib

A. Verify Data is Already in the Public Caslib

  1. Check Available Data in the Public Caslib:

    • Open SAS Studio or SAS Visual Analytics.

    • Run the following code to list all tables in the Public caslib:

    proc cas; table.tableInfo / caslib="Public"; quit;

OR

Go to Manage Data Pane by clicking the Navigation Bar (nine dots at the top-left corner) then select Manage Data:

manage data.png

 

In “Sources” tab, click on “cas-shared-default” to expand the list of available caslibs. Next, select “Public” to display a list of available data tables in the right pane.

  1. Locate your dataset by checking the output or the In-memory data list if you are searching for it in the Manage Data pane.

B. Import Data to the Public Caslib (if not present)

  1. Prepare the Dataset:

    • Ensure the dataset is in a supported format such as .csv, .xlsx, or .sas7bdat.

  2. Upload the Dataset to the Public Caslib:

    a. Upload the Dataset Using SAS Code:
    Follow these steps to upload the dataset into the Public caslib.

    cas; libname public cas caslib="public"; /* When you "promote" a CAS table, it becomes global-scoped, allowing it to be accessed by other users and sessions */ data public.<your_data_name> (promote=yes); set <sas_data>; run;
    • Replace <your_data_name> with your desired name for the table in the Public caslib.

    • Replace <sas_data> with the name of your SAS data.

    b. Importing the Data from Your Local Computer or Workspace:

To import your data, navigate to the Manage Data Pane and click on “Import.” From there, you can upload your data from your workspace or local computer.

 

  1. Verify Data Import:

    • Re-run the tableInfo procedure to confirm the dataset is now available in the Public caslib:

    proc cas; table.tableInfo / caslib="Public"; quit;

     

  2. Add CAS Data to Import:

Navigate to the Manage Data pane. Click on “Sources,” then select the “Public” caslib. Next, right-click on the data you wish to use for your report and choose “Add to import.”

Step 2: Save the Report in the Public Folder

  1. Open SAS Viya Visual Analytics:

  2. Create or Open the Report:

    • Design the report using the data stored in the Public caslib.

  3. Save the Report:

    • Navigate to File > Save As.

    • Save the report in the Public folder under SAS Content.

  4. Verify Report Location:

    • Navigate to the Public folder in the Content pane to confirm that the report is saved correctly.

Step 3: Share the Dashboard or Report

  1. Generate a Shareable Link:

    Click the three-dot icon located in the upper right corner and choose the option “Copy link.”

To enable guest access and generate an interactive report, follow these steps:

(1) Click on 🔽Options .

(2) Select Guest access, Interactive report, and Embeddable link (if applicable).

(3) Finally, click on Copy link.

 

  1. Test Accessibility:

    • Open the link in a private/incognito browser session to ensure accessibility without Viya credentials.

Key Points and Best Practices

  • Data Requirement:

    • The report must use data stored in the Public caslib; otherwise, it cannot be accessed by users without SAS Viya credentials.

  • Verify Permissions:

    • Ensure appropriate read permissions are set for the Public caslib and Public folder content.

  • Secure Data Handling:

    • Only upload non-sensitive or anonymized datasets to the Public caslib.

This guide ensures a seamless process for creating, saving, and sharing reports or dashboards with external users in SAS Viya.