Guide | Demo Data & Scripts

This guide will detail the location and function for the demo data and scripts that are installed with CJ Path.

Start your CJ Path docker container as "apache" user

  1. Open a shell
  2. Start your docker container by entering:
    docker start cjpath
    docker attach cjpath
  3. Switch to "apache" user by entering:
    su -s /bin/bash apache
    Example of entries on Windows Powershell

Explore the apache_log project directory

CJ Path comes loaded with three existing project directories.  We will explore the apache_log directory.

  1. First view a list of project directories by entering:
    bash-4.3$ cd /var/www/html/cjpath/ess
    bash-4.3$ ls -l
    Example of project directories
  2. Access the apache_log directory and list its contents.
    Example list of directories in apache_log

    The directories and files listed here serve the following purpose:

    1. cache – subdirectory to store cache data
    2. createdb.sh – script to create database
    3. data – subdirectory to store data files
    4. demo.sh – script to run demo data
    5. import.sh – script to import data
    6. make_cj.sh – script to create customer journey data
    7. pagename.csv – sample table to transform page names
    8. profile.sh – script to fill profile vector
    9. setup.sh – script to create categories
    10. usrconfig.inc – text file for project configuration
    11. usrparam.inc – text file for customer parameters

Explore Sample Data

The apache_log project data contains 3 weekly web server log files that are typical apache logs. Let’s examine their contents.

  1. 1. Access the data subdirectory and view the contents of the apachelog.zip file.
    bash-4.3$ cd data
    bash-4.3$ ls
    bash-4.3$ unzip -l apachelog.zip
    Example of compressed apache logs
  2. View a few lines of the top log file. Enter the following:
    bash-4.3$ unzip -c apachelog.zip 125-access_log-20140330
    Example of a few lines from log file

    The data contained in these logs are what is used for generating the customer journey paths for this project.

Run setup.sh

This script is used to create a virtual schema of the raw data. This is primarily a preparatory step prior to processing the customer journey tables.

The setup.sh script for this project looks like the following:

When you execute the script, it performs the following:

In the summary, we see that a newly created virtual schema labeled “apachlog” was made from the raw log files.

Run make_cj.sh

This script processes the raw log data and imports it into the CJ database.
The make_cj.sh script contains the following:

Run demo.sh

This script checks that the data and configuration settings are correct by running a few demo analyses on the data.
The demo.sh script contains the following:

 

Execution will result in an output of various data analysis samples.

Demo data in the UI

The CJ Path demo project apache_log can then be viewed in the UI by opening a browser and entering http://localhost.

You can also use the project selector to view data from the other projects as well as any custom projects you add on your own.