Skip to content

Commit 3d86faa

Browse files
author
Alex Meadows
committed
process_tracker_python-83 Add extract file type and compression type
✨ Enabled file and compression types on ExtractTracker object
1 parent bf33c94 commit 3d86faa

File tree

1 file changed

+59
-59
lines changed

1 file changed

+59
-59
lines changed

dbscripts/postgresql_process_tracker.sql

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ comment on table process_tracker.dataset_type_lkup is 'High level of dataset typ
1717
alter table process_tracker.dataset_type_lkup owner to pt_admin;
1818

1919
create unique index dataset_type_lkup_dataset_type_uindex
20-
on table process_tracker.dataset_type_lkup (dataset_type);
20+
on process_tracker.dataset_type_lkup (dataset_type);
2121

2222
create table process_tracker.error_type_lkup
2323
(
@@ -29,12 +29,12 @@ create table process_tracker.error_type_lkup
2929

3030
comment on table process_tracker.error_type_lkup is 'Types of errors that are being tracked.';
3131

32-
comment on table process_tracker.column error_type_lkup.error_type_name is 'Unique error type name.';
32+
comment on column process_tracker.error_type_lkup.error_type_name is 'Unique error type name.';
3333

3434
alter table process_tracker.error_type_lkup owner to pt_admin;
3535

3636
create unique index error_type_lkup_udx01
37-
on table process_tracker.error_type_lkup (error_type_name);
37+
on process_tracker.error_type_lkup (error_type_name);
3838

3939
create table process_tracker.error_tracking
4040
(
@@ -43,22 +43,22 @@ create table process_tracker.error_tracking
4343
primary key,
4444
error_type_id integer not null,
4545
process_tracking_id integer not null,
46-
error_description table process_tracker.varchar(750),
46+
error_description varchar(750),
4747
error_occurrence_date_time timestamp not null
4848
);
4949

5050
comment on table process_tracker.error_tracking is 'Tracking of process errors';
5151

52-
comment on table process_tracker.column error_tracking.error_type_id is 'The type of error being recorded.';
52+
comment on column process_tracker.error_tracking.error_type_id is 'The type of error being recorded.';
5353

54-
comment on table process_tracker.column error_tracking.process_tracking_id is 'The specific process run that triggered the error.';
54+
comment on column process_tracker.error_tracking.process_tracking_id is 'The specific process run that triggered the error.';
5555

56-
comment on table process_tracker.column error_tracking.error_occurrence_date_time is 'The timestamp when the error occurred.';
56+
comment on column process_tracker.error_tracking.error_occurrence_date_time is 'The timestamp when the error occurred.';
5757

5858
alter table process_tracker.error_tracking owner to pt_admin;
5959

6060
create index error_tracking_idx01
61-
on table process_tracker.error_tracking (process_tracking_id, error_type_id);
61+
on process_tracker.error_tracking (process_tracking_id, error_type_id);
6262

6363
create table process_tracker.tool_lkup
6464
(
@@ -73,7 +73,7 @@ comment on table process_tracker.tool_lkup is 'List of tools that are used to ru
7373
alter table process_tracker.tool_lkup owner to pt_admin;
7474

7575
create unique index tool_lkup_tool_udx01
76-
on table process_tracker.tool_lkup (tool_name);
76+
on process_tracker.tool_lkup (tool_name);
7777

7878
create table process_tracker.source_lkup
7979
(
@@ -88,7 +88,7 @@ comment on table process_tracker.source_lkup is 'Source system where data origin
8888
alter table process_tracker.source_lkup owner to pt_admin;
8989

9090
create unique index source_lkup_udx01
91-
on table process_tracker.source_lkup (source_name);
91+
on process_tracker.source_lkup (source_name);
9292

9393
create table process_tracker.process_status_lkup
9494
(
@@ -103,7 +103,7 @@ comment on table process_tracker.process_status_lkup is 'Process status states';
103103
alter table process_tracker.process_status_lkup owner to pt_admin;
104104

105105
create unique index process_status_lkup_udx01
106-
on table process_tracker.process_status_lkup (process_status_name);
106+
on process_tracker.process_status_lkup (process_status_name);
107107

108108
create table process_tracker.process_type_lkup
109109
(
@@ -115,12 +115,12 @@ create table process_tracker.process_type_lkup
115115

116116
comment on table process_tracker.process_type_lkup is 'Valid process types for processes';
117117

118-
comment on table process_tracker.column process_type_lkup.process_type_name is 'Unique process type name.';
118+
comment on column process_tracker.process_type_lkup.process_type_name is 'Unique process type name.';
119119

120120
alter table process_tracker.process_type_lkup owner to pt_admin;
121121

122122
create unique index process_type_lkup_udx01
123-
on table process_tracker.process_type_lkup (process_type_name);
123+
on process_tracker.process_type_lkup (process_type_name);
124124

125125
create table process_tracker.process
126126
(
@@ -140,20 +140,20 @@ create table process_tracker.process
140140

141141
comment on table process_tracker.process is 'Processes being tracked';
142142

143-
comment on table process_tracker.column process.process_name is 'Unique name for process.';
143+
comment on column process_tracker.process.process_name is 'Unique name for process.';
144144

145-
comment on table process_tracker.column process.total_record_count is 'Total number of records processed over all runs of process.';
145+
comment on column process_tracker.process.total_record_count is 'Total number of records processed over all runs of process.';
146146

147-
comment on table process_tracker.column process.process_type_id is 'The type of process being tracked.';
147+
comment on column process_tracker.process.process_type_id is 'The type of process being tracked.';
148148

149-
comment on table process_tracker.column process.process_tool_id is 'The type of tool used to execute the process.';
149+
comment on column process_tracker.process.process_tool_id is 'The type of tool used to execute the process.';
150150

151-
comment on table process_tracker.column process.last_failed_run_date_time is 'The last time the process failed to run.';
151+
comment on column process_tracker.process.last_failed_run_date_time is 'The last time the process failed to run.';
152152

153153
alter table process_tracker.process owner to pt_admin;
154154

155155
create unique index process_udx01
156-
on table process_tracker.process (process_name);
156+
on process_tracker.process (process_name);
157157

158158
create table process_tracker.process_dependency
159159
(
@@ -169,9 +169,9 @@ create table process_tracker.process_dependency
169169

170170
comment on table process_tracker.process_dependency is 'Dependency tracking between processes.';
171171

172-
comment on table process_tracker.column process_dependency.parent_process_id is 'The parent process.';
172+
comment on column process_tracker.process_dependency.parent_process_id is 'The parent process.';
173173

174-
comment on table process_tracker.column process_dependency.child_process_id is 'The child process.';
174+
comment on column process_tracker.process_dependency.child_process_id is 'The child process.';
175175

176176
alter table process_tracker.process_dependency owner to pt_admin;
177177

@@ -188,7 +188,7 @@ comment on table process_tracker.actor_lkup is 'List of developers or applicatio
188188
alter table process_tracker.actor_lkup owner to pt_admin;
189189

190190
create unique index actor_lkup_udx01
191-
on table process_tracker.actor_lkup (actor_name);
191+
on process_tracker.actor_lkup (actor_name);
192192

193193
create table process_tracker.process_tracking
194194
(
@@ -215,36 +215,36 @@ create table process_tracker.process_tracking
215215

216216
comment on table process_tracker.process_tracking is 'Tracking table of process runs.';
217217

218-
comment on table process_tracker.column process_tracking.process_id is 'The process that is being run.';
218+
comment on column process_tracker.process_tracking.process_id is 'The process that is being run.';
219219

220-
comment on table process_tracker.column process_tracking.process_status_id is 'The current status of the given process run.';
220+
comment on column process_tracker.process_tracking.process_status_id is 'The current status of the given process run.';
221221

222-
comment on table process_tracker.column process_tracking.process_run_id is 'The unique run identifier for the process. Sequential to the unique process.';
222+
comment on column process_tracker.process_tracking.process_run_id is 'The unique run identifier for the process. Sequential to the unique process.';
223223

224-
comment on table process_tracker.column process_tracking.process_run_low_date_time is 'The lowest datetime provided by the extract dataset being processed.';
224+
comment on column process_tracker.process_tracking.process_run_low_date_time is 'The lowest datetime provided by the extract dataset being processed.';
225225

226-
comment on table process_tracker.column process_tracking.process_run_high_date_time is 'The highest datetime provided by the extract dataset being processed.';
226+
comment on column process_tracker.process_tracking.process_run_high_date_time is 'The highest datetime provided by the extract dataset being processed.';
227227

228-
comment on table process_tracker.column process_tracking.process_run_start_date_time is 'The datetime which the process run kicked off.';
228+
comment on column process_tracker.process_tracking.process_run_start_date_time is 'The datetime which the process run kicked off.';
229229

230-
comment on table process_tracker.column process_tracking.process_run_end_date_time is 'The datetime which the process run ended (either in failure or success).';
230+
comment on column process_tracker.process_tracking.process_run_end_date_time is 'The datetime which the process run ended (either in failure or success).';
231231

232-
comment on table process_tracker.column process_tracking.process_run_record_count is 'The number of unique records processed by the run.';
232+
comment on column process_tracker.process_tracking.process_run_record_count is 'The number of unique records processed by the run.';
233233

234-
comment on table process_tracker.column process_tracking.process_run_actor_id is 'The actor who kicked the process run off.';
234+
comment on column process_tracker.process_tracking.process_run_actor_id is 'The actor who kicked the process run off.';
235235

236-
comment on table process_tracker.column process_tracking.is_latest_run is 'Flag for determining if the run record is the latest for a given process.';
236+
comment on column process_tracker.process_tracking.is_latest_run is 'Flag for determining if the run record is the latest for a given process.';
237237

238238
alter table process_tracker.process_tracking owner to pt_admin;
239239

240240
create index process_tracking_idx01
241-
on table process_tracker.process_tracking (process_id, process_status_id);
241+
on process_tracker.process_tracking (process_id, process_status_id);
242242

243243
create index process_tracking_idx02
244-
on table process_tracker.process_tracking (process_run_start_date_time, process_run_end_date_time);
244+
on process_tracker.process_tracking (process_run_start_date_time, process_run_end_date_time);
245245

246246
create index process_tracking_idx03
247-
on table process_tracker.process_tracking (process_run_low_date_time, process_run_high_date_time);
247+
on process_tracker.process_tracking (process_run_low_date_time, process_run_high_date_time);
248248

249249
create table process_tracker.extract_status_lkup
250250
(
@@ -259,22 +259,22 @@ comment on table process_tracker.extract_status_lkup is 'List of valid extract p
259259
alter table process_tracker.extract_status_lkup owner to pt_admin;
260260

261261
create unique index extract_status_lkup_extract_status_name_uindex
262-
on table process_tracker.extract_status_lkup (extract_status_name);
262+
on process_tracker.extract_status_lkup (extract_status_name);
263263

264-
create table process_tracker.location_type_lkup
264+
create table location_type_lkup
265265
(
266266
location_type_id serial not null
267267
constraint location_type_lkup_pk
268268
primary key,
269269
location_type_name varchar(25) not null
270270
);
271271

272-
comment on table process_tracker.location_type_lkup is 'Listing of location table process_tracker.types';
272+
comment on table process_tracker.location_type_lkup is 'Listing of location types';
273273

274274
alter table process_tracker.location_type_lkup owner to pt_admin;
275275

276276
create unique index location_type_lkup_udx01
277-
on table process_tracker.location_type_lkup (location_type_name);
277+
on process_tracker.location_type_lkup (location_type_name);
278278

279279
create table process_tracker.location_lkup
280280
(
@@ -295,10 +295,10 @@ comment on table process_tracker.location_lkup is 'Locations where files are loc
295295
alter table process_tracker.location_lkup owner to pt_admin;
296296

297297
create unique index location_lkup_udx01
298-
on table process_tracker.location_lkup (location_name);
298+
on process_tracker.location_lkup (location_name);
299299

300300
create unique index location_lkup_udx02
301-
on table process_tracker.location_lkup (location_path);
301+
on location_lkup (location_path);
302302

303303
create table process_tracker.process_source
304304
(
@@ -346,7 +346,7 @@ comment on table process_tracker.system_lkup is 'ProcessTracker system informati
346346
alter table process_tracker.system_lkup owner to pt_admin;
347347

348348
create unique index system_lkup_system_key_uindex
349-
on table process_tracker.system_lkup (system_key);
349+
on system_lkup (system_key);
350350

351351
create table process_tracker.cluster_tracking
352352
(
@@ -367,7 +367,7 @@ comment on table process_tracker.cluster_tracking is 'Capacity cluster tracking'
367367
alter table process_tracker.cluster_tracking owner to pt_admin;
368368

369369
create unique index cluster_tracking_cluster_name_uindex
370-
on table process_tracker.cluster_tracking (cluster_name);
370+
on process_tracker.cluster_tracking (cluster_name);
371371

372372
create table process_tracker.cluster_process
373373
(
@@ -401,7 +401,7 @@ comment on table process_tracker.source_object_lkup is 'Reference table for sour
401401
alter table process_tracker.source_object_lkup owner to pt_admin;
402402

403403
create unique index source_object_lkup_udx01
404-
on table process_tracker.source_object_lkup (source_id, source_object_name);
404+
on source_object_lkup (source_id, source_object_name);
405405

406406
create table process_tracker.process_target_object
407407
(
@@ -495,10 +495,10 @@ create table process_tracker.contact_lkup
495495
alter table process_tracker.contact_lkup owner to pt_admin;
496496

497497
create unique index contact_lkup_contact_email_uindex
498-
on table process_tracker.contact_lkup (contact_email);
498+
on process_tracker.contact_lkup (contact_email);
499499

500500
create unique index contact_lkup_contact_name_uindex
501-
on table process_tracker.contact_lkup (contact_name);
501+
on process_tracker.contact_lkup (contact_name);
502502

503503
create table process_tracker.source_contact
504504
(
@@ -539,7 +539,7 @@ create table process_tracker.extract_compression_type_lkup
539539
alter table process_tracker.extract_compression_type_lkup owner to pt_admin;
540540

541541
create unique index extract_compression_type_lkup_extract_compression_type_uindex
542-
on table process_tracker.extract_compression_type_lkup (extract_compression_type);
542+
on process_tracker.extract_compression_type_lkup (extract_compression_type);
543543

544544
create table process_tracker.extract_filetype_lkup
545545
(
@@ -587,27 +587,27 @@ create table process_tracker.extract_tracking
587587

588588
comment on table process_tracker.extract_tracking is 'Tracking table for all extract/staging data files.';
589589

590-
comment on table process_tracker.column extract_tracking.extract_filename is 'The unique filename for a given extract from a given source.';
590+
comment on column process_tracker.extract_tracking.extract_filename is 'The unique filename for a given extract from a given source.';
591591

592-
comment on table process_tracker.column extract_tracking.extract_location_id is 'The location table process_tracker.where the given extract can be found.';
592+
comment on column process_tracker.extract_tracking.extract_location_id is 'The location where the given extract can be found.';
593593

594-
comment on table process_tracker.column extract_tracking.extract_process_run_id is 'The process that registered or created the extract file.';
594+
comment on column process_tracker.extract_tracking.extract_process_run_id is 'The process that registered or created the extract file.';
595595

596-
comment on table process_tracker.column extract_tracking.extract_status_id is 'The status of the extract.';
596+
comment on column process_tracker.extract_tracking.extract_status_id is 'The status of the extract.';
597597

598-
comment on table process_tracker.column extract_tracking.extract_registration_date_time is 'The datetime that the extract was loaded into extract tracking.';
598+
comment on column process_tracker.extract_tracking.extract_registration_date_time is 'The datetime that the extract was loaded into extract tracking.';
599599

600-
comment on table process_tracker.column extract_tracking.extract_write_low_date_time is 'The lowest datetime of the data set as noted when writing the data file.';
600+
comment on column process_tracker.extract_tracking.extract_write_low_date_time is 'The lowest datetime of the data set as noted when writing the data file.';
601601

602-
comment on table process_tracker.column extract_tracking.extract_write_high_date_time is 'The highest datetime of the data set as noted when writing the data file.';
602+
comment on column process_tracker.extract_tracking.extract_write_high_date_time is 'The highest datetime of the data set as noted when writing the data file.';
603603

604-
comment on table process_tracker.column extract_tracking.extract_write_record_count is 'The record count of the data set as noted when writing the data file.';
604+
comment on column process_tracker.extract_tracking.extract_write_record_count is 'The record count of the data set as noted when writing the data file.';
605605

606-
comment on table process_tracker.column extract_tracking.extract_load_low_date_time is 'The lowest datetime of the data set as noted when loading the data file. Should match the extract_write_low_date_time.';
606+
comment on column process_tracker.extract_tracking.extract_load_low_date_time is 'The lowest datetime of the data set as noted when loading the data file. Should match the extract_write_low_date_time.';
607607

608-
comment on table process_tracker.column extract_tracking.extract_load_high_date_time is 'The highest datetime of the data set as noted when loading the data file.';
608+
comment on column process_tracker.extract_tracking.extract_load_high_date_time is 'The highest datetime of the data set as noted when loading the data file.';
609609

610-
comment on table process_tracker.column extract_tracking.extract_load_record_count is 'The record count of the data set when loading the data file.';
610+
comment on column process_tracker.extract_tracking.extract_load_record_count is 'The record count of the data set when loading the data file.';
611611

612612
alter table process_tracker.extract_tracking owner to pt_admin;
613613

@@ -664,5 +664,5 @@ comment on table process_tracker.extract_dataset_type is 'Relationship between e
664664
alter table process_tracker.extract_dataset_type owner to pt_admin;
665665

666666
create unique index extract_filetype_lkup_extract_filetype_uindex
667-
on table process_tracker.extract_filetype_lkup (extract_filetype);
667+
on process_tracker.extract_filetype_lkup (extract_filetype);
668668

0 commit comments

Comments
 (0)