Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

By the end of this chapter page you will be able to:

  • Create file collectors and streams to read data from files into PhixFlow
  • Run analysis on Streams
  • View stream data

Table of Contents

Create a new file collector

Before starting this exercise, you will need to download a pack of files. These are available here: download train.zip. Save these Extract the files to a convenient location on your local drive, and unzip. Throughout the course, these will be referred to as the input files.

...

  1. In the model toolbar, drag 
    Insert excerpt
    _file_collector
    _file_collector
    nopaneltrue
     onto  into the modelling panemodel.
  2. In the new file collector settings tab that opens, enter the Name: Customer Addresses.
  3. Click 
    Insert excerpt
    _finish
    _finish
    nopaneltrue
    .
  4. You will now see the new file collector on the model.

    In the model toolbar, click

    Insert excerpt
    _save
    _save
    nopaneltrue
     to make sure that the new file collector will be shown when you re-open this model. Remember to save the model layout every time you add a new modelling component.


...

  1. Hover over your new file collector, and press Image Removedclick
    Insert excerpt
    _upload_file
    _upload_file
    nopaneltrue
    .
  2. In the file explorer, go to: …\inputData\AddressCheck\custAddrFiles\input.
  3. Select the file custAddr_20090322_1.txt and press click Open.
  4. In the Upload Managed File form, press Upload.You will see a stream appear on your model – window, click the 
    Insert excerpt
    _upload_button
    _upload_button
    nopaneltrue
     button.
  5. PhixFlow adds a new stream to your model. PhixFlow has automatically configured the file collector and the stream to load the file into PhixFlow.

...


In this case, once you have loaded the file, you will "pause" the file data so that you do not need to reload the file from your computer every time you run the model.
We will cover pausing components in PhixFlow in more detail in the Modelling Concepts course.
To pause the data loaded from the file:

...

  1. In your model, hover your mouse pointer over the stream

...

  1. icon Image Modified

...

  1.  for CustomerAddresses.
  2. In the pop-up toolbar, click 
    Insert excerpt
    _static
    _static
    nopaneltrue
    .

Run analysis on the stream

You will now run analysis on your new stream. Analysis is the process that does all PhixFlow's data processing.
To run analysis:

...

  1. In your model, hover your mouse pointer over the stream icon Image Added.
  2. In the pop-up toolbar, select the
    Insert excerpt
    _run_analysis
    _run_analysis
    nopaneltrue
    .

...

  1. PhixFlow runs the model, reading in data from the file of customer addresses via the file collector.
  2. You will get a confirmation message when this has completed. We will look at messages in the console later.

View stream data

To view the data you just loaded:

...

  1. In your model, hover your mouse pointer over the stream

...

  1. icon Image Added.
  2. In the pop-up toolbar, click 
    Insert excerpt
    _stream_views
    _stream_views
    nopaneltrue
    .
  3. In the drop-down list, select  
    Insert excerpt
    _view_default
    _view_default
    nopaneltrue
    .