Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Scenario
Where we have two sources of data that share the same structure, i.e. the same attribute names, we can combine these into a single table without the need to perform a merge. The intention is that we will keep all records, so for every record
passed in, a record is passed out.
This technique is useful when performing a data migration
that consolidates data from 3 separate systems that all follow the same data structure
.
Solution
It is assumed that all data sources are imported into their own tables in an
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
- From the
drop down on the analysis toolbar, click and drag aInsert excerpt _tables _tables nopanel true Insert excerpt _
table_
calculate_
table _
table_
calculate_
table nopanel true
- table on your model
- In the
- Properties, set the Name
Businesses Merged
The attributes can be created manually using the plus button in the Attributes section. Here we will use the attributes from the Businesses 1 table to automatically setup our merge attributes.
Hover over the Businesses 1 table and from the hover over- , e.g.
Output Table
- , e.g.
For each of the input tables, from its hover over toolbar, select
, then click the end of the arrow onto the output tableInsert excerpt _pipe _pipe nopanel true Hover over the first input table and from the popup toolbar click
Insert excerpt _attributes_
icon _attributes_
icon nopanel true
- In the Attributes window, tick all of the attributes and
- drag them
- onto the output table
- Select Use original attribute name
Click OK to save and close the settings for the merge table.
Connect the Inputs
In the analysis model, hover over the Businesses 1 table
.
- Click Confirm
- This automatically creates the attributes for us in the output table
- Close the Attributes window
- Click Confirm
- We now need to set up the attributes to pull information from all input tables
- Click on the output table and
the tab to keep it openInsert excerpt _pin _pin nopanel true - In the Attributes section, double click the first attribute
- Remove the pipe prefix, typically this will be "in."
- For example,
in.CompanyName
becomesCompanyName
. - By doing this we are telling PhixFlow to look for this attribute name regardless of which pipe it is coming from
- For example,
- Repeat this for all of your attributes, the configuration is illustrated below:
- f
- Click on the output table and
- Click
to save and close the settings for the output tableInsert excerpt _finish _finish nopanel true