Databases Reference
In-Depth Information
8.
Once in the
Transformation
tab, we will create the script to load the
previously created
Temp_Employment
table via a
Resident
load. We will also
name this new table as
Employment
. Write the following code:
Employment:
Load
[%Airline ID],
Year,
[Month (#)],
[# Total Employees],
Period,
Month,
[%Unique Carrier Code],
[Unique Carrier],
[Carrier Code],
[Carrier Name],
[%Carrier Group ID],
[# Full Time Employees],
[# Part Time Employees],
[# Equivalent FTEs]
Resident Temp_Employment;
We are now ready to add the transformation functions to the table. It's important
to note that, if we reload the script at this point, the new employment data will
never be created because of the Natural Concatenation feature we talked about in
Chapter 8
,
Data Modeling Best Practices
, since both the
Temp_Employment
table and
the
Employment
table will have exactly the same number of fields as well as the
same field names. However, with the functions we will apply, and the new fields
we will add, this structural similarity will be lost and we will not need to add the
NoConcatenate
keyword.
Sorting the table
Using the techniques learned in the
Sorting tables
section of this chapter, we will
set the load order of the
Resident
table using the
Airline ID
,
Year
, and
Month #
fields. The earlier script will be modified to:
Employment:
Load
[%Airline ID],
Year,
[Month (#)],
[# Total Employees],
Period,
Month,