docs.intersystems.com
Home  /  Downloading Samples for Use with InterSystems Products


Articles
Downloading Samples for Use with InterSystems Products
InterSystems: The power behind what matters   
Search:  


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 Data Platform 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:
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
GitHub provides options that let you download a repo as a single packaged unit, which you can then uncompress as a directory with multiple files. The details are different by operating system.
Downloading a Repo on Windows
To download a repo on Windows:
  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.
  4. The browser then 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.
Downloading a Repo on Linux and Unix
To download a repo on Linux and Unix®:
  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.
  3. Press Enter
    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 next step, you are starting to create the namespace.
  3. For Enter the name of your database, enter SAMPLES. The name is not case-sensitive.
  4. Click Next.
  5. Accept all other values as default.
  6. Click Finish.
    This step finished creating the database.
  7. 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.
  8. Accept all other values as default.
  9. 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: