Skip to content

Commit b4efdde

Browse files
committed
ref data Syncronising >Synchronization
clean whitespace and spellin update
1 parent c96c329 commit b4efdde

File tree

1 file changed

+88
-88
lines changed

1 file changed

+88
-88
lines changed

020_DIRECT_Framework/Direct_Framework/Scripts/InsertReferenceData.sql

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -10,154 +10,154 @@ insert into omd.LAYER
1010
select *
1111
from (
1212
/* LAYER_CODE, LAYER_DESCRIPTION */
13-
values (N'Integration', N'The Integration Layer')
14-
, (N'Presentation', N'The Presentation Layer')
15-
, (N'Staging', N'The Staging Layer')
16-
, (N'Maintenance', N'Internal Data Solution')
17-
) as refData(LAYER_CODE, LAYER_DESCRIPTION)
13+
values (N'Integration', N'The Integration Layer')
14+
, (N'Presentation', N'The Presentation Layer')
15+
, (N'Staging', N'The Staging Layer')
16+
, (N'Maintenance', N'Internal Data Solution')
17+
) as refData(LAYER_CODE, LAYER_DESCRIPTION)
1818
where not exists (
19-
select null
20-
from omd.LAYER
21-
where LAYER.LAYER_CODE = refData.LAYER_CODE
22-
);
19+
select null
20+
from omd.LAYER
21+
where LAYER.LAYER_CODE = refData.LAYER_CODE
22+
);
2323

2424
/* Area */
2525
insert into omd.AREA
2626
select *
2727
from (
28-
/* AREA_CODE, LAYER_CODE, AREA_DESCRIPTION */
29-
values (N'HELPER', N'Presentation', N'The Helper Area')
30-
, (N'PSA', N'Staging', N'The Persistent Staging Area')
31-
, (N'INT', N'Integration', N'The Integration Area')
32-
, (N'INTPR', N'Integration', N'The Interpretation Area')
33-
, (N'PRES', N'Presentation', N'The Presentation Area')
34-
, (N'STG', N'Staging', N'The Staging Area of the Staging Layer')
35-
, (N'SYNC', N'Staging', N'Syncronising of the production History Area of the Staging Layer for build and test')
36-
, (N'Maintenance', N'Maintenance', N'Internal Data Solution')
37-
) as refData(AREA_CODE, LAYER_CODE, AREA_DESCRIPTION)
28+
/* AREA_CODE, LAYER_CODE, AREA_DESCRIPTION */
29+
values (N'HELPER', N'Presentation', N'The Helper Area')
30+
, (N'PSA', N'Staging', N'The Persistent Staging Area')
31+
, (N'INT', N'Integration', N'The Integration Area')
32+
, (N'INTPR', N'Integration', N'The Interpretation Area')
33+
, (N'PRES', N'Presentation', N'The Presentation Area')
34+
, (N'STG', N'Staging', N'The Staging Area of the Staging Layer')
35+
, (N'SYNC', N'Staging', N'Synchronization of the production History Area of the Staging Layer for build and test')
36+
, (N'Maintenance', N'Maintenance', N'Internal Data Solution')
37+
) as refData(AREA_CODE, LAYER_CODE, AREA_DESCRIPTION)
3838
where not exists (
39-
select null
40-
from omd.AREA
41-
where omd.AREA.AREA_CODE = refData.AREA_CODE
42-
);
39+
select null
40+
from omd.AREA
41+
where omd.AREA.AREA_CODE = refData.AREA_CODE
42+
);
4343

4444
/* Execution Status */
4545
insert into omd.EXECUTION_STATUS
4646
select *
4747
from (
48-
/* EXECUTION_STATUS_CODE, EXECUTION_STATUS_DESCRIPTION */
49-
values (N'A', N'Aborted')
50-
, (N'C', N'Cancelled / skipped')
51-
, (N'E', N'Executing')
52-
, (N'F', N'Failure')
53-
, (N'S', N'Succes')
54-
) as refData(EXECUTION_STATUS_CODE, EXECUTION_STATUS_DESCRIPTION)
48+
/* EXECUTION_STATUS_CODE, EXECUTION_STATUS_DESCRIPTION */
49+
values (N'A', N'Aborted')
50+
, (N'C', N'Cancelled / skipped')
51+
, (N'E', N'Executing')
52+
, (N'F', N'Failure')
53+
, (N'S', N'Succes')
54+
) as refData(EXECUTION_STATUS_CODE, EXECUTION_STATUS_DESCRIPTION)
5555
where not exists (
56-
select null
57-
from omd.EXECUTION_STATUS
58-
where omd.EXECUTION_STATUS.EXECUTION_STATUS_CODE = refData.EXECUTION_STATUS_CODE
59-
);
56+
select null
57+
from omd.EXECUTION_STATUS
58+
where omd.EXECUTION_STATUS.EXECUTION_STATUS_CODE = refData.EXECUTION_STATUS_CODE
59+
);
6060

6161
/* Next Run Indicator */
6262
insert into omd.NEXT_RUN_INDICATOR
6363
select *
6464
from (
65-
/* NEXT_RUN_INDICATOR, NEXT_RUN_INDICATOR_DESCRIPTION */
66-
values (N'C', N'Cancelled / skipped. Administrators can manually set this code to for the Next Run Indicator.')
67-
, (N'P', N'Proceed. The next run of the Batch/Module to set to continue processing.')
68-
, (N'R', N'Rollback . Upon failure the Next Run Indicator is updated to ‘R’ to signal a rollback.')
69-
) as refData(NEXT_RUN_INDICATOR, NEXT_RUN_INDICATOR_DESCRIPTION)
65+
/* NEXT_RUN_INDICATOR, NEXT_RUN_INDICATOR_DESCRIPTION */
66+
values (N'C', N'Cancelled / skipped. Administrators can manually set this code to for the Next Run Indicator.')
67+
, (N'P', N'Proceed. The next run of the Batch/Module to set to continue processing.')
68+
, (N'R', N'Rollback . Upon failure the Next Run Indicator is updated to ‘R’ to signal a rollback.')
69+
) as refData(NEXT_RUN_INDICATOR, NEXT_RUN_INDICATOR_DESCRIPTION)
7070
where not exists (
71-
select null
72-
from omd.NEXT_RUN_INDICATOR
73-
where omd.NEXT_RUN_INDICATOR.NEXT_RUN_INDICATOR = refData.NEXT_RUN_INDICATOR
74-
);
71+
select null
72+
from omd.NEXT_RUN_INDICATOR
73+
where omd.NEXT_RUN_INDICATOR.NEXT_RUN_INDICATOR = refData.NEXT_RUN_INDICATOR
74+
);
7575

7676
/* Processing Indicator */
7777
insert into omd.PROCESSING_INDICATOR
7878
select *
7979
from (
80-
/* PROCESSING_INDICATOR, PROCESSING_INDICATOR_DESCRIPTION */
81-
values (N'A', N'Abort. This indicates that the Batch/Module is already running.')
82-
, (N'C', N'Cancel / skip. The process has determined that it is not necessary to run this ETL process.')
83-
, (N'P', N'Proceed. The Instance can continue on to the next step of the processing.')
84-
, (N'R', N'Rollback. During rollback processing the Processor Indicator is set to R.')
85-
) as refData(PROCESSING_INDICATOR, PROCESSING_INDICATOR_DESCRIPTION)
80+
/* PROCESSING_INDICATOR, PROCESSING_INDICATOR_DESCRIPTION */
81+
values (N'A', N'Abort. This indicates that the Batch/Module is already running.')
82+
, (N'C', N'Cancel / skip. The process has determined that it is not necessary to run this ETL process.')
83+
, (N'P', N'Proceed. The Instance can continue on to the next step of the processing.')
84+
, (N'R', N'Rollback. During rollback processing the Processor Indicator is set to R.')
85+
) as refData(PROCESSING_INDICATOR, PROCESSING_INDICATOR_DESCRIPTION)
8686
where not exists (
87-
select null
88-
from omd.PROCESSING_INDICATOR
89-
where omd.PROCESSING_INDICATOR.PROCESSING_INDICATOR = refData.PROCESSING_INDICATOR
90-
);
87+
select null
88+
from omd.PROCESSING_INDICATOR
89+
where omd.PROCESSING_INDICATOR.PROCESSING_INDICATOR = refData.PROCESSING_INDICATOR
90+
);
9191

9292
/* Event Type */
9393
insert into omd.EVENT_TYPE
9494
select *
9595
from (
96-
/* EVENT_TYPE_CODE, EVENT_TYPE_DESCRIPTION */
97-
values (N'1', N'Infrastructural error.')
98-
, (N'2', N'Internal data integration process error or system generated event.')
99-
, (N'3', N'Custom exception handling that has been implemented in ETL (Error Bitmaps).')
100-
) as refData(EVENT_TYPE_CODE, EVENT_TYPE_DESCRIPTION)
96+
/* EVENT_TYPE_CODE, EVENT_TYPE_DESCRIPTION */
97+
values (N'1', N'Infrastructural error.')
98+
, (N'2', N'Internal data integration process error or system generated event.')
99+
, (N'3', N'Custom exception handling that has been implemented in ETL (Error Bitmaps).')
100+
) as refData(EVENT_TYPE_CODE, EVENT_TYPE_DESCRIPTION)
101101
where not exists (
102-
select null
103-
from omd.EVENT_TYPE
104-
where omd.EVENT_TYPE.EVENT_TYPE_CODE = refData.EVENT_TYPE_CODE
105-
);
102+
select null
103+
from omd.EVENT_TYPE
104+
where omd.EVENT_TYPE.EVENT_TYPE_CODE = refData.EVENT_TYPE_CODE
105+
);
106106

107107
/* Batch */
108108
set identity_insert omd.BATCH on;
109109
insert into omd.BATCH (BATCH_ID, BATCH_CODE, FREQUENCY_CODE, BATCH_DESCRIPTION, INACTIVE_INDICATOR)
110110
select *
111111
from (
112-
/* BATCH_ID, BATCH_CODE, FREQUENCY_CODE, BATCH_DESCRIPTION, INACTIVE_INDICATOR */
113-
values (0, N'Default Batch', N'Continuous', N'Placeholder value for dummy Batch runs', N'N')
114-
) as refData(BATCH_ID, BATCH_CODE, FREQUENCY_CODE, BATCH_DESCRIPTION, INACTIVE_INDICATOR)
112+
/* BATCH_ID, BATCH_CODE, FREQUENCY_CODE, BATCH_DESCRIPTION, INACTIVE_INDICATOR */
113+
values (0, N'Default Batch', N'Continuous', N'Placeholder value for dummy Batch runs', N'N')
114+
) as refData(BATCH_ID, BATCH_CODE, FREQUENCY_CODE, BATCH_DESCRIPTION, INACTIVE_INDICATOR)
115115
where not exists (
116-
select null
117-
from omd.BATCH
118-
where omd.BATCH.BATCH_ID = refData.BATCH_ID
119-
);
116+
select null
117+
from omd.BATCH
118+
where omd.BATCH.BATCH_ID = refData.BATCH_ID
119+
);
120120
set identity_insert omd.BATCH off;
121121

122122
/* Batch Instance */
123123
set identity_insert omd.BATCH_INSTANCE on;
124124
insert into omd.BATCH_INSTANCE (BATCH_INSTANCE_ID, BATCH_ID, START_DATETIME, END_DATETIME, PROCESSING_INDICATOR, NEXT_RUN_INDICATOR, EXECUTION_STATUS_CODE, BATCH_EXECUTION_SYSTEM_ID)
125125
select *
126126
from (
127-
/* BATCH_INSTANCE_ID, BATCH_ID, START_DATETIME, END_DATETIME, PROCESSING_INDICATOR, NEXT_RUN_INDICATOR, EXECUTION_STATUS_CODE, BATCH_EXECUTION_SYSTEM_ID */
128-
values (0, 0, CAST(N'1900-01-01T00:00:00.000' AS DateTime), CAST(N'2018-10-17T15:07:44.843' AS DateTime), N'P', N'P', N'S', N'N/A')
129-
) as refData(BATCH_INSTANCE_ID, BATCH_ID, START_DATETIME, END_DATETIME, PROCESSING_INDICATOR, NEXT_RUN_INDICATOR, EXECUTION_STATUS_CODE, BATCH_EXECUTION_SYSTEM_ID)
127+
/* BATCH_INSTANCE_ID, BATCH_ID, START_DATETIME, END_DATETIME, PROCESSING_INDICATOR, NEXT_RUN_INDICATOR, EXECUTION_STATUS_CODE, BATCH_EXECUTION_SYSTEM_ID */
128+
values (0, 0, CAST(N'1900-01-01T00:00:00.000' AS DateTime), CAST(N'2018-10-17T15:07:44.843' AS DateTime), N'P', N'P', N'S', N'N/A')
129+
) as refData(BATCH_INSTANCE_ID, BATCH_ID, START_DATETIME, END_DATETIME, PROCESSING_INDICATOR, NEXT_RUN_INDICATOR, EXECUTION_STATUS_CODE, BATCH_EXECUTION_SYSTEM_ID)
130130
where not exists (
131-
select null
132-
from omd.BATCH_INSTANCE
133-
where omd.BATCH_INSTANCE.BATCH_INSTANCE_ID = refData.BATCH_INSTANCE_ID
134-
);
131+
select null
132+
from omd.BATCH_INSTANCE
133+
where omd.BATCH_INSTANCE.BATCH_INSTANCE_ID = refData.BATCH_INSTANCE_ID
134+
);
135135
set identity_insert omd.BATCH_INSTANCE off;
136136

137137
/* Module */
138138
set identity_insert omd.MODULE on;
139139
insert into omd.MODULE (MODULE_ID, MODULE_CODE, MODULE_DESCRIPTION, MODULE_TYPE, DATA_OBJECT_SOURCE, DATA_OBJECT_TARGET, AREA_CODE, FREQUENCY_CODE, INACTIVE_INDICATOR, [EXECUTABLE])
140140
select *
141141
from (
142-
values (0, 'Default Module', 'Placeholder value for dummy Module runs', 'ETL', 'N/A', 'N/A', 'Maintenance', 'Continuous', 'N', 'SELECT NULL')
143-
) as refData(MODULE_ID, MODULE_CODE, MODULE_DESCRIPTION, MODULE_TYPEE, DATA_OBJECT_SOURCE, DATA_OBJECT_TARGET, AREA_CODE, FREQUENCY_CODE, INACTIVE_INDICATOR, [EXECUTABLE])
142+
values (0, 'Default Module', 'Placeholder value for dummy Module runs', 'ETL', 'N/A', 'N/A', 'Maintenance', 'Continuous', 'N', 'SELECT NULL')
143+
) as refData(MODULE_ID, MODULE_CODE, MODULE_DESCRIPTION, MODULE_TYPEE, DATA_OBJECT_SOURCE, DATA_OBJECT_TARGET, AREA_CODE, FREQUENCY_CODE, INACTIVE_INDICATOR, [EXECUTABLE])
144144
where not exists (
145-
select null
146-
from omd.MODULE
147-
where omd.MODULE.MODULE_ID = refData.MODULE_ID
148-
);
145+
select null
146+
from omd.MODULE
147+
where omd.MODULE.MODULE_ID = refData.MODULE_ID
148+
);
149149
set identity_insert omd.MODULE off;
150150

151151
/* Module Instance */
152152
set identity_insert omd.MODULE_INSTANCE on;
153153
insert into omd.MODULE_INSTANCE (MODULE_INSTANCE_ID, MODULE_ID, BATCH_INSTANCE_ID, START_DATETIME, END_DATETIME, PROCESSING_INDICATOR, NEXT_RUN_INDICATOR, EXECUTION_STATUS_CODE, MODULE_EXECUTION_SYSTEM_ID, ROWS_INPUT, ROWS_INSERTED, ROWS_UPDATED, ROWS_DELETED, ROWS_DISCARDED, ROWS_REJECTED, EXECUTED_CODE)
154154
select *
155155
from (
156-
values (0, 0, 0,'1900-01-01', '9999-12-31', 'P', 'P', 'S', 'N/A',0,0,0,0,0,0, 'N/A')
157-
) as refData(MODULE_INSTANCE_ID, MODULE_ID, BATCH_INSTANCE_ID, START_DATETIME, END_DATETIME, PROCESSING_INDICATOR, NEXT_RUN_INDICATOR, EXECUTION_STATUS_CODE, MODULE_EXECUTION_SYSTEM_ID, ROWS_INPUT, ROWS_INSERTED, ROWS_UPDATED, ROWS_DELETED, ROWS_DISCARDED, ROWS_REJECTED, EXECUTED_CODE)
156+
values (0, 0, 0,'1900-01-01', '9999-12-31', 'P', 'P', 'S', 'N/A',0,0,0,0,0,0, 'N/A')
157+
) as refData(MODULE_INSTANCE_ID, MODULE_ID, BATCH_INSTANCE_ID, START_DATETIME, END_DATETIME, PROCESSING_INDICATOR, NEXT_RUN_INDICATOR, EXECUTION_STATUS_CODE, MODULE_EXECUTION_SYSTEM_ID, ROWS_INPUT, ROWS_INSERTED, ROWS_UPDATED, ROWS_DELETED, ROWS_DISCARDED, ROWS_REJECTED, EXECUTED_CODE)
158158
where not exists (
159-
select null
160-
from omd.MODULE_INSTANCE
161-
where omd.MODULE_INSTANCE.MODULE_INSTANCE_ID = refData.MODULE_INSTANCE_ID
162-
);
159+
select null
160+
from omd.MODULE_INSTANCE
161+
where omd.MODULE_INSTANCE.MODULE_INSTANCE_ID = refData.MODULE_INSTANCE_ID
162+
);
163163
set identity_insert omd.MODULE_INSTANCE off;

0 commit comments

Comments
 (0)