...
- Create a new model with the Name
Channel Package Check
. - Add a file collector to your model and load the data:
- From the model toolbar, drag drag a
into the model.Insert excerpt _add_file_collector _add_file_collector nopanel true - PhixFlow displays the settings tab for the new file collector. Set the Name to
Customer Care Updates
. - In the model, hover your mouse pointer over the
Channel Package Check
file collector to display the context toolbar and click
.Insert excerpt _upload_file _upload_file nopanel true - Navigate to the directory
<path>\train\inputData\ChannelPackages\CustomerCareUpdates
. - Select the file
CustomerCareUpdates.txt
, click Open, then click
.Insert excerpt _upload_button _upload_button nopanel true - PhixFlow adds a new stream to the model, called
CustomerCareUpdate
. - In the model, hover over the new
CustomerCareUpdates
stream and clickInsert excerpt _run_analysis _run_analysis nopanel true - Check the data is loaded. There should be 8 lines of data, with columns for Customer Ref, Sales Date and Package.
- Now the data is loaded into the stream, set the stream to
.Insert excerpt _static _static nopanel true
- From the model toolbar, drag drag a
- Add another file collector to your model and repeat the process described in step 2. This time:
- Set the file collector Name to
Shop Updates
. - Upload
<path>\train\inputData\ChannelPackages\ShopUpdates\ShopUpdates.txt
. - PhixFlow loads 7 rows of data to this stream.
- Remember to set the steam to
.Insert excerpt _static _static nopanel true
- Set the file collector Name to
...
- Create a new stream in your model and populate its attributes.
- Hover over
CustomerCareUpdates
and clickInsert excerpt _stream_add _stream_add_stream nopanel true - In the settings, set the Name to
Combined Updates
. - In the model, show the stream attributes for
CustomerCareUpdates
. - Select all the attributes and drag them into the properties for the
Combined Updates
stream. Drop them into the Attributes section. - Click
.Insert excerpt _finish _finish nopanel true
- Hover over
- To save your model, in the model toolbar click
.Insert excerpt _save _save nopanel true - Connect the
ShopUpdates
stream to theCombined Updates
stream.- Hover over
ShopUpdates
and click
.Insert excerpt _add_connectorpipe _add_connectorpipe nopanel true Click
Combined Updates
to link the pipe to the stream.Info When you connect streams, PhixFlow automatically adds a reference to the input pipe name. This appears in the attribute expression. To merge this data successfully, you must update the attribute expressions to remove the
in.
prefix; see step 4 below.
- Hover over
- Fix all the attribute expressions.
- Double-click on
Combined Updates
to open its settings tab. For each attribute: - In the Attributes section, double-click on an attribute to open its settings.I
- In the Basic Settings section, edit the Expression to remove
in.
and clickInsert excerpt _finish _finish nopanel true
- Double-click on
- In the
Combined Updates
stream settings tab, click
to save and close.Insert excerpt _finish _finish nopanel true - In the model, hover your mouse pointer over
Combined Updates
and click
.Insert excerpt _run_analysis _run_analysis nopanel true - When the stream has run, check that the stream has:
- the columns CustomerRef, Sales Date and Package
- 15 rows
- all cells have data.
The stream default view:
...
- To update the name of the pipe from the
CustomerCareUpdates
stream to theCombined Updates
stream:- In the model, click on the pipe to open its settings tab.
- Set Name to
CC
. - Click
to save and close the pipe settings.Insert excerpt _finish _finish nopanel true
- Update the name of the pipe from the
ShopUpdates
file collector to theShopUpdates
stream.- In the model, click on the pipe to open its settings tab.
- Set Name to shop
- Click
to save and close pipe settings.Insert excerpt _finish _finish nopanel true
- Double-click the stream
Combined Updates
to open its settings tab. - In the Attributes section, click
add a new attribute and set:Insert excerpt _add_object _add_object nopanel true - Name:
Source
. Expression:
Code Block if (_pipeName == "CC", "Customer Care" , "Shop" )
- Click
to save and close the attribute settings.Insert excerpt _finish _finish nopanel true
- Name:
- To make
Source
the first attribute in the stream, drag it to the top of the attributes list. - Click
to save and close the stream settings.Insert excerpt _finish _finish nopanel true - Run analysis on
Combined Updates
. - Check the output data set and make sure that the source has been recorded on each record correctly.