-
Notifications
You must be signed in to change notification settings - Fork 0
/
PopulateRoomAssignments.dtsx
181 lines (181 loc) · 9.33 KB
/
PopulateRoomAssignments.dtsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?xml version="1.0"?>
<DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts"
DTS:refId="Package"
DTS:CreationDate="6/23/2014 11:24:54 AM"
DTS:CreationName="SSIS.Package.3"
DTS:CreatorComputerName="ODS"
DTS:CreatorName="ACADEMIC\webserv"
DTS:DTSID="{BCF4F841-FBF6-4871-B88E-4E1BF9D1A097}"
DTS:ExecutableType="SSIS.Package.3"
DTS:LastModifiedProductVersion="11.0.7462.6"
DTS:LocaleID="1033"
DTS:ObjectName="PopulateRoomAssignments"
DTS:PackageType="5"
DTS:VersionBuild="25"
DTS:VersionGUID="{598B1AF2-BC72-43E3-B2B1-65AD92984BE3}">
<DTS:Property
DTS:Name="PackageFormatVersion">6</DTS:Property>
<DTS:ConnectionManagers>
<DTS:ConnectionManager
DTS:refId="Package.ConnectionManagers[Mail Connection]"
DTS:CreationName="SMTP"
DTS:DTSID="{139DD9FE-75BF-4A13-83DC-7D11DE413165}"
DTS:ObjectName="Mail Connection">
<DTS:ObjectData>
<SmtpConnectionManager
ConnectionString="SmtpServer=receive.roanoke.edu;UseWindowsAuthentication=False;EnableSsl=False;" />
</DTS:ObjectData>
</DTS:ConnectionManager>
<DTS:ConnectionManager
DTS:refId="Package.ConnectionManagers[ods.ODS_Reporting]"
DTS:CreationName="OLEDB"
DTS:DTSID="{A1172001-5073-4C67-8242-9AD9C33BC3D8}"
DTS:ObjectName="ods.ODS_Reporting">
<DTS:ObjectData>
<DTS:ConnectionManager
DTS:ConnectionString="Data Source=ods;Initial Catalog=ODS_Reporting;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;" />
</DTS:ObjectData>
</DTS:ConnectionManager>
</DTS:ConnectionManagers>
<DTS:Variables />
<DTS:Executables>
<DTS:Executable
DTS:refId="Package\Clear Staging Table DM_Room_Assignments"
DTS:CreationName="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
DTS:Description="Execute SQL Task"
DTS:DTSID="{04D07DD8-337D-4EFC-8725-EAC3F6C327DA}"
DTS:ExecutableType="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
DTS:LocaleID="-1"
DTS:ObjectName="Clear Staging Table DM_Room_Assignments"
DTS:TaskContact="Execute SQL Task; Microsoft Corporation; SQL Server 2012; © 2007 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1"
DTS:ThreadHint="0">
<DTS:Variables />
<DTS:ObjectData>
<SQLTask:SqlTaskData
SQLTask:Connection="{A1172001-5073-4C67-8242-9AD9C33BC3D8}"
SQLTask:SqlStatementSource="DELETE FROM SANDBOX.STAGING.DBO.DM_ROOM_ASSIGNMENTS;" xmlns:SQLTask="www.microsoft.com/sqlserver/dts/tasks/sqltask" />
</DTS:ObjectData>
</DTS:Executable>
<DTS:Executable
DTS:refId="Package\Move Room Assignment Data to Staging Table DM_Room_Assignments"
DTS:CreationName="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
DTS:Description="Execute SQL Task"
DTS:DTSID="{87C309B4-0113-4DE0-924B-B0B90B7F707F}"
DTS:ExecutableType="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
DTS:LocaleID="-1"
DTS:ObjectName="Move Room Assignment Data to Staging Table DM_Room_Assignments"
DTS:TaskContact="Execute SQL Task; Microsoft Corporation; SQL Server 2012; © 2007 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1"
DTS:ThreadHint="0">
<DTS:Variables />
<DTS:ObjectData>
<SQLTask:SqlTaskData
SQLTask:Connection="{A1172001-5073-4C67-8242-9AD9C33BC3D8}"
SQLTask:SqlStatementSource="INSERT INTO SANDBOX.Staging.dbo.DM_Room_Assignments

SELECT 

RMAS_PERSON_ID as RCID, 
ROOM_ASSIGNMENT_ID as RoomAssignmentId, 
RMAS_TERM as Term, 
ROOMS_BLDG_ID as BuildingCode, 
BLDG_DESC as BuildingName,
ROOMS_ROOM_ID as RoomNumber,
ROOM_Type as RoomType,
		
(select dbo.FN_DATAMART_FY_STATUS(RMAS_PERSON_ID,RMAS_TERM)) as FYFreshman,
		
CURRENT_TIMESTAMP as ImportDate

FROM R_DATAMART_ACTIVE_ROOM_ASSIGNMENTS_VIEW 

WHERE 
substring(RMAS_TERM,1,4) > (DATEPART(YEAR,GETDATE())-1)	

AND ROOMS_BLDG_ID <> 'WLB';	" xmlns:SQLTask="www.microsoft.com/sqlserver/dts/tasks/sqltask" />
</DTS:ObjectData>
</DTS:Executable>
</DTS:Executables>
<DTS:PrecedenceConstraints>
<DTS:PrecedenceConstraint
DTS:refId="Package.PrecedenceConstraints[Constraint 2]"
DTS:CreationName=""
DTS:DTSID="{CEB01DED-DA34-4C01-9893-5B3032D0D627}"
DTS:From="Package\Clear Staging Table DM_Room_Assignments"
DTS:LogicalAnd="True"
DTS:ObjectName="Constraint 2"
DTS:To="Package\Move Room Assignment Data to Staging Table DM_Room_Assignments" />
</DTS:PrecedenceConstraints>
<DTS:DesignTimeProperties><![CDATA[<?xml version="1.0"?>
<!--This CDATA section contains the layout information of the package. The section includes information such as (x,y) coordinates, width, and height.-->
<!--If you manually edit this section and make a mistake, you can delete it. -->
<!--The package will still be able to load normally but the previous layout information will be lost and the designer will automatically re-arrange the elements on the design surface.-->
<Objects
Version="sql11">
<!--Each node below will contain properties that do not affect runtime behavior.-->
<Package
design-time-name="Package">
<LayoutInfo>
<GraphLayout
Capacity="8" xmlns="clr-namespace:Microsoft.SqlServer.IntegrationServices.Designer.Model.Serialization;assembly=Microsoft.SqlServer.IntegrationServices.Graph" xmlns:mssgle="clr-namespace:Microsoft.SqlServer.Graph.LayoutEngine;assembly=Microsoft.SqlServer.Graph" xmlns:assembly="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mssge="clr-namespace:Microsoft.SqlServer.Graph.Extended;assembly=Microsoft.SqlServer.IntegrationServices.Graph" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<NodeLayout
Size="289,42"
Id="Package\Clear Staging Table DM_Room_Assignments"
TopLeft="13,73" />
<NodeLayout
Size="416,42"
Id="Package\Move Room Assignment Data to Staging Table DM_Room_Assignments"
TopLeft="60,228" />
<EdgeLayout
Id="Package.PrecedenceConstraints[Constraint 2]"
TopLeft="157.5,115">
<EdgeLayout.Curve>
<mssgle:Curve
StartConnector="{assembly:Null}"
EndConnector="110.5,113"
Start="0,0"
End="110.5,105.5">
<mssgle:Curve.Segments>
<mssgle:SegmentCollection
Capacity="5">
<mssgle:LineSegment
End="0,52.5" />
<mssgle:CubicBezierSegment
Point1="0,52.5"
Point2="0,56.5"
Point3="4,56.5" />
<mssgle:LineSegment
End="106.5,56.5" />
<mssgle:CubicBezierSegment
Point1="106.5,56.5"
Point2="110.5,56.5"
Point3="110.5,60.5" />
<mssgle:LineSegment
End="110.5,105.5" />
</mssgle:SegmentCollection>
</mssgle:Curve.Segments>
</mssgle:Curve>
</EdgeLayout.Curve>
<EdgeLayout.Labels>
<EdgeLabelCollection />
</EdgeLayout.Labels>
</EdgeLayout>
<AnnotationLayout
Text="Sandbox Version"
ParentId="Package"
Size="212,43"
Id="5fc5d890-5f6b-4cee-ab9f-84e14671a022"
TopLeft="28,22">
<AnnotationLayout.FontInfo>
<mssge:FontInfo
Family="Tahoma"
Size="14.25"
Color="#FFFF0000"
Weight="Bold">
<mssge:FontInfo.TextDecorations>
<av:TextDecorationCollection />
</mssge:FontInfo.TextDecorations>
</mssge:FontInfo>
</AnnotationLayout.FontInfo>
</AnnotationLayout>
<AnnotationLayout
Text="All email notifactions on the Sandbox ver of these packages have been disabled. 
We need to make sure they are active in Hermes (Live) once they are ready.
Gabrielson 11/2017"
ParentId="Package"
Size="433,67"
Id="c74a919c-57ae-48a6-909f-88f9003ea0fb"
TopLeft="13,414">
<AnnotationLayout.FontInfo>
<mssge:FontInfo
Family="Tahoma"
Size="11.25"
Color="#FF000000"
Style="Italic">
<mssge:FontInfo.TextDecorations>
<av:TextDecorationCollection />
</mssge:FontInfo.TextDecorations>
</mssge:FontInfo>
</AnnotationLayout.FontInfo>
</AnnotationLayout>
</GraphLayout>
</LayoutInfo>
</Package>
</Objects>]]></DTS:DesignTimeProperties>
</DTS:Executable>