Databases Reference
In-Depth Information
We will solve the problem by merging all these tables into a single Aircraft Types
dimension table. The following schematic shows the general approach we will
be taking.
We will begin by joining the Aircraft Groups table to the Aircraft Types table. We
will then concatenate (or union, for SQL connoisseurs) the Aircraft Types 2010 table
to the result we got by joining the Aircraft Groups table to the Aircraft Types table.
To achieve this, we follow these steps:
1.
Go back to the script editor by pressing Ctrl + E or by selecting File | Edit
Script from the menu.
2.
Go to the LOAD statement for the file Aircraft_Group.csv and replace the
text [Aircraft Groups]: with the text LEFT JOIN ([Aircraft Types]) .
3.
Next, go to the LOAD statement for the file Aircraft_2010_Update.
csv and replace the text [Aircraft Types 2010]: with the text
CONCATENATE([Aircraft Types]) .
4.
Replace the line reading AC_GROUPNAME, with SubField(AC_GROUPNAME, ',
', 1) as [Aircraft Engine Type], and press Return to create a new line.
5.
On this new line enter SubField(AC_GROUPNAME, ', ', 2) as [Aircraft
Number Of Engines], .
6.
Beneath the LOAD statement for the file Aircraft_2010_Update.csv add
the following code: DROP FIELD [%Aircraft Group Type] FROM
[Aircraft Types]; .
Search WWH ::




Custom Search