Versions Compared

Key

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

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

...

  • Create File Collectors file collectors and Streams streams to read data from files into PhixFlow
  • Run Analysis analysis on Streams
  • View Stream data

...

  • stream data

Create a new File Collector

Before starting this exercise, you will need to download a pack of files. These are available here: train.zip

Save these to a convenient location on your local drive, and unzip. Throughout the course, these will be referred to as the input files.

A file containing details of customer addresses can be found in the input files, at:

[unzipped location]\inputData\AddressCheck\custAddrFiles\input\custAddr_20090322_1.txt
Open this file and have a look at the data in it.
Notice, in particular, that there is a header line in the file with the column names of the data in the file.
Add a new File Collector file collector to your model to read this file into PhixFlow:

  • Drag Image Removed Drag Image Added - Add a new File Collector onto the modelling pane
  • In the new File Collector file collector form that pops up, enter the Name: Customer Addresses
  • Press OK
  • You will now see the new File Collector on the modelling pane

    Press the button Save the model layout to make sure that the new

    File Collector

    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.

    Anchor_Ref403551378_Ref403551378 Anchor_Toc442889040_Toc442889040

    Set up File Collector and Stream

  • Hover over your new File Collectorfile collector, and press
  • In the file explorer, go to: …\inputData\AddressCheck\custAddrFiles\input
  • Select the file custAddr_20090322_1.txt and press Open
  • In the Upload Managed File form, press Image Removed - OK Upload
  • You will see a

...

  • stream appear on your model – PhixFlow has automatically configured the

...

  • file collector and the

...

  • stream to load the file into PhixFlow.

...

Pause file data

In this course you will build up a model by adding components and running them. In PhixFlow, running a component causes each of its inputs to also run. This is so that you only need to run the final component in a model and it will, in turn, run everything needed you need to populate this component it, all the way back to the raw inputs to PhixFlow (via file collectors and database collectors).
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:

  • Hover over the stream (the icon icon Image Modified on your model) CustomerAddresses
  • In the hover menu press

...

Run Analysis on Stream

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

  • Hover over the stream – a hover menu appears
  • Select the Image Removed the Image Added - Run Analysis - this will run the Streamstream, and read in data from the file of customer addresses via the File Collectorfile collector
  • You will see the console appear; this will show your task as running, and then completed

...

  • get a confirmation message when this has completed - we will look at the console later

View Stream data

To view the data you just loaded:

  • Hover over the Stream stream, and in the hover menu press Image Removed press Image Added - Show the list of Stream Views
  • In the drop down list, select Default View