Databases Reference
In-Depth Information
We must add that leaving dimensions out should be a thorough decision process,
thinking both in terms of analytical requirements and the aggregation rate we can
achieve. For example, removing the Country dimension would not result in any
substantial aggregation if we keep the State field. Also, what happens if we remove
the Airport dimensions but keep Origin City and Destination City? What happens is,
not surprisingly, that the table will not be significantly reduced since both fields keep
a close relation and their granularity is almost the same (there is only one airport in
most cities). Therefore, and for the sake of simplicity, we will also leave out all city,
state, and country fields.
Finally, before proceeding, we should keep in mind how many records the
original table has, in order to be able to measure how much reduction we achieved
in the summarization. In our case, the
Flight Data
table originally contains
1,256,075 rows.
Moving on to the aggregation process, follow these steps:
1.
Create a new QlikView document and save it inside the
2.Workbooks
folder
with the name
Transform - Flight Data.qvw
.
2.
Go to the
Script Editor
window, click on the
Table Files…
button in the tool
pane and navigate to the
3.QVD\Source
folder.
3.
Select the
Flight Data.qvd
file and click
Finish
on the
File Wizard
window.
4.
From the generated
Load
script, find the lines corresponding to those fields
related to origin and destination airports and erase them. The fields we
should remove are:
°
%Origin Airport ID
°
%Origin Airport Sequence ID
°
%Origin Airport Market ID
°
%Origin World Area Code
°
%Destination Airport ID
°
%Destination Airport Sequence ID
°
%Destination Airport Market ID
°
%Destination World Area Code Distance
°
Origin Airport Code
°
Origin City
°
Origin State Code
°
Origin State FIPS
°
Origin State
°
Origin Country Code
°
Origin Country