intersystems / Samples-BI

Provides sample data for use with InterSystems IRIS Business Intelligence, as well as fully developed sample BI models and dashboards.
MIT License
12 stars 20 forks source link
intersystems-iris intersystems-samples

Samples-BI

This is the README file for SAMPLES-BI. The end of the file has setup instructions.


Use or operation of this code is subject to acceptance of the license available in the code repository for this code.


Overview

Samples-BI is meant for use with the InterSystems IRIS Business Intelligence capabilities. In order to use this sample, you must have an InterSystems IRIS license that includes these capabilities.

These classes provide sample data that you can use to explore the capabilities of InterSystems IRIS BI. They also demonstrate ways to create BI models using InterSystems IRIS BI.

This sample contains two packages:

The documentation for InterSystems IRIS Business Intelligence refers extensively to these samples. The HoleFoods model provides a quick and easy introduction to BI, and the BI model demonstrates null handling, list-based levels, and other features not included in HoleFoods. The BI package also explicitly demonstrates how to address more difficult modeling scenarios.

After setup:

The repository also includes a number of configuration files and scripts that are not part of the sample itself. Please refer to [dev.md] for more about the role of these files.

Contents of the BI package

This package provides simple data representing a fictitious medical study, and also provides an InterSystems IRIS BI model that uses that data.

Contents of the HoleFoods package

This package provides simple data representing sales of food products, and also provides an InterSystems IRIS BI model that uses that data.

Setup instructions

Setup with ZPM

ZPM stands for ObjectScript Package Manager. It provides a simple and unified way to install ObjectScript modules Learn More. You can either install ZPM on an existing InterSystems IRIS instance based on these instructions, or use one of the prebuilt Community Edition Docker images that have it pre-installed. The instructions below are for the latter option. If you already have ZPM installed, you can immediately proceed to jump to step 4.

  1. Make sure you have Docker-desktop installed.

  2. Pull the IRIS Community Edition image with zpm:

    $ docker pull intersystemsdc/iris-community:2021.1.0.215.0-zpm

    You can take the latest tag of IRIS or IRIS for Health Community Edition with ZPM here

  3. Run IRIS container with ZPM:

    $ docker run --name irisce -d --publish 52773:52773 intersystemsdc/iris-community:2021.1.0.215.0-zpm
  4. RUN IRIS terminal

    
    docker exec -it irisce iris session iris
    Node: c6e0f00b8d42, Instance: IRIS

USER>


4. From the IRIS terminal, start ZPM and install Samples-BI:

USER>zpm
zpm: USER>install samples-bi

[samples-bi] Reload START [samples-bi] Reload SUCCESS [samples-bi] Module object refreshed. [samples-bi] Validate START [samples-bi] Validate SUCCESS [samples-bi] Compile START [samples-bi] Compile SUCCESS [samples-bi] Activate START 2,187 row(s) created Building cube [HOLEFOODS] ... Complete Elapsed time: 0.009120s Source expression time: 0.000307s Defining term list Patients Pivots... Defining term list Patients RowSpecs... Defining YEAR pivot variable in PATIENTS cube

[samples-bi] Configure SUCCESS [samples-bi] Activate SUCCESS

5. Open IRIS analytics portal and work with Samples-BI:
http://localhost:52773/csp/user/_DeepSee.UserPortal.Home.zen?$NAMESPACE=USER

### Step-by-step Installation 

1. Clone or [download](http://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=asamples) the repository. If you downloaded a ZIP, extract the files to a directory on the server. You will need to refer to these files' location in step 8.
2. If you have not yet created a namespace in InterSystems IRIS, follow the [detailed instructions](http://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=ASAMPLES_createns) to do so. 
3. In the Management Portal, click System Administration > Security > Applications > Web Applications.
4. Click the link in the first column of the row /csp/mynamespace where `mynamespace` is the namespace from step 2.
5. Click the Analytics checkbox and then click Save.

6. Open the InterSystems IRIS Terminal.
7. Enter the following command (replacing `mynamespace` with the namespace from step 2):

ZN "mynamespace"

8. Enter the following commands (replacing `full-path-to-Build.SampleBI.cls` with the full path of the `buildsample/Build.SampleBI.cls` file):

do $system.OBJ.Load("full-path-to-Build.SampleBI.cls","ck")

do ##class(Build.SampleBI).Build()


9. When prompted, enter the full path of the directory to which you downloaded this sample. The method then loads and compiles the code and performs other needed setup steps.

Now, when you access the Analytics submenu of the Management Portal, this namespace will be listed. For example, you can now use the Analyzer with the cubes that are included within this sample.

IMPORTANT: If the namespace is not listed when you access the Analytics submenu of the Management Portal, see [Setting Up the Web Application](https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=D2IMP_ch_setup#D2IMP_setup_web_app) in the book [Implementing InterSystems IRIS Business Intelligence](https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=D2IMP_ch_setup).