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:

...

In 2 Using Excel Templates, you downloaded train.zip and saved the files to <path>. Find this file: <path>\inputData\AccountTransactions\AccountTransactions.xlsx. The second tab of this workbook – accountHistory contains details of account transactions.  

...

The easiest way to do this is to load the data from the first sheet, then edit the collector settingsproperties.

  1. Create a new model called Read Account History.

    Expand
    titleHow?
    1. In the repository browser, right-click Analysis Models then click 
      Insert excerpt
      _add_object
      _add_object
      nopaneltrue
       Analysis Model.
    2. PhixFlow displays the empty model in the modelling pane on the left and opens the model settings property tab on the right.
    3. In Basic Settings →  Name, enter Read Account History.


  2. Add a file collector and set Basic Settings → Name: LoadAccountHistory.

    Expand
    titleHow?
    1. From the model toolbar, drag drag a 
      Insert excerpt
      _add_file_collector
      _add_file_collector
      nopaneltrue
       into the model.
    2. PhixFlow displays the settings the property tab for the new file collector.


  3. In the settings the property tab toolbar, click 

    Insert excerpt
    _save
    _save
    nopaneltrue
    .

  4. Upload the data.

    Expand
    titleHow?
    1. In the model, hover your mouse pointer over the AccountHistory file collector to display the context toolbar and click 
      Insert excerpt
      _upload_file
      _upload_file
      nopaneltrue
      .
    2.  Navigate to the directory <path>\train\inputData\AccountTransactions\AccountTransactions.xlsx.
    3. Select the file AccountTransactions.xlsx and click Open, then click
      Insert excerpt
      _upload_button
      _upload_button
      nopaneltrue
      .


  5. PhixFlow adds a new stream to the model, called LoadAccountHistory.

...

  1. In the model, right-click the new stream and click permenantly delete
  2. Double-click LoadAccountHistory to open its settings its property tab. Set Advanced → Excel Data Range Expression"accountHistory!A1:F100"
  3. In the File Coluns Columns section, delete the column information that PhixFlow has already loaded.
  4. Click  - Create  file attributes 
  5. PhixFlow already knows about the data in the spreadsheet. It now uses the expression you added to read the information about the columns in the second worksheet. PhixFlow adds the attributes to the list.
  6. In the model view, from the hover menu of the file collector press  - Create a new Stream 
  7. Save your changes
  8. Have a look the attributes in the new stream – you can see that these have been derived from the columns in the file collector
  9. Run analysis on the stream and confirm that the data that has been read into PhixFlow is from the second tab in the spreadsheet

...