In Compose I want to create a single DWH table which will get:
One data column from table 'map1'
One data column from table 'map2'
The 1st step, is to create the DWH table in the model, this is just the table metadata:
I create the PK for the table by adding a new attribute domain – I select an Integer type:
I also click the 'key' column, to make this attribute a PK and validate the selection:
Now, I add a new "attribute domain" of type varchar(50), I do this once:
Once this type of domain attribute was added to the project, I can add it twice to my entity by changing the name of the attribute:
Note that the attribute domain is the same for both columns, I just give them different names.
This is how the final DWH table looks like, please keep in mind that this is just the table metadata:
Once the above is completed, I create the DWH:
In the "Manage ETL sets", I create a new set and click the "+ New Mapping" option to create the 1st map:
I select "map1" as the source table for this mapping:
I map the PK and the data1 columns from the source "map1" table as my 1st data DWH table data column:
I create a 2nd mapping for the map2 source table:
Here, I select on the right "map2" as the source table, and I map the "data2" 2nd column to my 2nd DWH data column:
Note: The PK column should be the same for the source tables and must be mapped in both mapping.
Once both mappings are created, I select both mappings and the "Handle Duplicates" option, and generate the task:
Because the PK column is shared between the mapping, we need to use the Handle Duplicate option otherwise the task will fail on a PK violation.
Once the task is generated, I run the task and click the "View Run Details" option:
I click the number of rows handled by the task:
Now I can see the DWH table and data which was populated by the task:
As you can see the 1st data column gets its data (single letters) from the "map1" source table and the 2nd data column get its data from the "map2" source table (double letters).