Learning
Community
Open Exchange
Global Masters
InterSystems IRIS Data Platform 2019.4 / All Documentation / Downloading Samples for Use with InterSystems Products

Downloading Samples for Use with InterSystems Products

This article describes how to download samples for use with InterSystems IRIS® data platform, as well as how to create a namespace and database to hold the samples. It contains these sections:

Introduction

The installation kit for InterSystems IRIS does not include samples; this enables the kit to be as small as possible. Instead, samples are available online at GitHub. In GitHub terms, each sample is provided as a repository or repo. The following link lists the InterSystems IRIS sample repos: https://github.com/search?q=topic%3Aintersystems-samples.
Each of the sample repos includes:
  • A detailed README file with specific setup instructions
  • A specialized routine that sets up the sample after you have downloaded it to a local disk.
Note that the InterSystems account (https://github.com/intersystems) includes many other repos. The repos that are meant for use with the InterSystems IRIS documentation are tagged with intersystems-samples and have names starting with Samples.
If you are familiar with GitHub, skip ahead to “Creating a Namespace and Database to Hold Samples.”
If you are not familiar with GitHub, see the next section for how to download samples. You do not need a GitHub account.

Downloading a Sample

You can download a GitHub repo as a single packaged unit, which you can then uncompress as a directory with multiple files. Choose which method you prefer:
If Git is installed on your machine, you can access the repo by cloning it, as described in Cloning a repository on the GitHub website (https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)

Using a Web Browser to Download a Repo

To download a repo using a web browser:
  1. Scroll through the list of samples until you find the repo you want.
  2. Click the link for that repo. The upper part of the page summarizes the contents, and the lower part displays the README file for the repo.
  3. Click the Clone or download button, visible from the default Code tab. Then click Download ZIP.
  4. The browser downloads a .zip file that contains the full repo. Depending on your browser settings, you may get prompted for a location. If not, check the usual download location for your browser.
  5. Uncompress the .zip file. The uncompressed directory contains a README.md file, a LICENSE file, a buildsample subdirectory, and other files and subdirectories.

Using Linux or UNIX® Command Line to Download a Repo

To download a repo using Linux or UNIX® command line:
  1. Scroll through the list of samples until you find the repo you want, noting the name of the repo. For example, the name of the repo might be Sample-Data. You need this repo name in the next step.
  2. From the shell, type:
    wget -qO- https://github.com/intersystems/repo-name/archive/master.tar.gz | tar xvz -C /samples
    
    where repo-name is the name of the repo you want, and /samples is an existing directory.
  3. Press Enter to download the repo into the /samples directory.
    The uncompressed directory contains a README.md file, a LICENSE file, a buildsample subdirectory, and other files and subdirectories.

Creating a Namespace and Database to Hold Samples

Many of the samples include InterSystems IRIS classes or routines and are meant to be loaded into an InterSystems IRIS instance. InterSystems recommends that you create a dedicated namespace and database called SAMPLES for this purpose and then load the samples into this namespace.
To create the SAMPLES namespace and database:
  1. In the Management Portal, click System Administration > Configuration > System Configuration > Namespaces.
  2. In the Name of the Namespace, enter SAMPLES.
  3. Next to Select an existing database for Globals, click Create New Database.
    In the next step, you are starting to create the namespace.
  4. For Enter the name of your database, enter SAMPLES. The name is not case-sensitive.
  5. For Database directory, enter SAMPLES.
  6. Click Next.
  7. Accept all other values as default.
  8. Click Finish.
    This step finished creating the database.
  9. For Select an existing database for Routines, select the database that you just created.
    Note that for a production system, you would use a different database to store routines and classes.
  10. Accept all other values as default.
  11. Click Save.

Completing README.md steps

Now that you have downloaded the repo and created a namespace, you must complete the other setup steps in the README.md file that is included with the GitHub repo. Tasks might include:
  • Enabling analytics for samples that are intended to demonstrate the analytics functionality of InterSystems IRIS.
  • Loading and compiling the sample data.