11 Static Tables and Static Pipes
- Chris Welford
- Zoe Baldwin
- Anthony George
By the end of this chapter you will be able to:
- Create and use static tables
- Create and use static pipes
When Run Analysis is selected on a Table, the tables preceding it are run first, so that the data contained is the most recent. When there is no need to run all of the tables that are connected, e.g. you have a static dataset which will not change, you can make a table or pipe Static. This ensures that the data in that table will not change - unless Run Analysis is selected for that specific table.
Create and use a static table
- Create a model
Static Streams and Pipes
- Drag the datasource
CRM
onto the model - From this datasource, find the table
SOURCE_CHANNEL_LIST,
create a database collector and table to read this table into PhixFlow. - Create a database collector and table to read data from the table
SOURCE_CHANNEL_DESCRIPTIONS
into PhixFlow.
You will use the table SOURCE_CHANNEL_DESCRIPTIONS
as reference data to look up the description for each channel listed in SOURCE_CHANNEL_LIST
:
- Hover over
SOURCE_CHANNEL_DESCRIPTIONS
and press Static. - Run analysis on
SOURCE_CHANNEL_DESCRIPTIONS
to load data into the table. - Add a lookup pipe from
SOURCE_CHANNEL_DESCRIPTIONS
toSOURCE_CHANNEL_LIST
- Complete configuration of the pipe:
- Name the pipe:
desc
Create an Order/Index as follows:
Left-hand (reference data - SOURCE_CHANNEL_LIST)
Right-hand (output - SOURCE_CHANNEL_LIST)
CHANNEL
CHANNEL
- Name the pipe:
- Drag the attribute
CHANNEL_DESC
fromSOURCE_CHANNEL_DESCRIPTIONS
toSOURCE_CHANNEL_LIST
- Run analysis on
SOURCE_CHANNEL_LIST
You should see that the data in SOURCE_CHANNEL_LIST
is loaded, including the channel description looked up from SOURCE_CHANNEL_DESCRIPTIONS
. However, look at the table sets for SOURCE_CHANNEL_DESCRIPTIONS
:
- From the hover menu of the table
SOURCE_CHANNEL_DESCRIPTIONS
, press Show Recordsets.
You should see that it has only run once. Compare the run dates with the table sets in SOURCE_CHANNEL_LIST
. You will see that SOURCE_CHANNEL_DESCRIPTIONS
was not run when you ran SOURCE_CHANNEL_LIST
- SOURCE_CHANNEL_DESCRIPTIONS, it only ran when you ran it on its own.
Create and use a static pipe
- Hover over
SOURCE_CHANNEL_LIST
and press Create New Table. - Call the new table
Customer Channel Copy
- Copy all attributes from
SOURCE_CHANNEL_LIST
toCustomer Channel Copy
- Click on the pipe and in the Basic Settings, select the tick box
Static
. - Run analysis on
Customer Channel Copy.
- In the model window, click Save.
You will see that the data in the table is generated, but that SOURCE_CHANNEL_LIST
did not run.