You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✨ low and high dates, number of records can now be tracked on
Extracts, both at write and at load.
Extracts now can have their data's low and high dates as well as number
of records tracked both when the file is written and when the file is
loading. All audit fields are optional.
Added table fields to sql scripts as well.
Closes#17
extract_write_low_date_time datetime null comment 'The lowest datetime of the data set as noted when writing the data file.',
63
+
extract_write_high_date_time datetime null comment 'The highest datetime of the data set as noted when writing the data file.',
64
+
extract_write_record_count intnull comment 'The record count of the data set as noted when writing the data file.',
65
+
extract_load_low_date_time datetime null comment 'The lowest datetime of the data set as noted when loading the data file. Should match the extract_write_low_date_time.',
66
+
extract_load_high_date_time datetime null comment 'The highest datetime of the data set as noted when loading the data file. Should match the extract_load_high_date_time.',
67
+
extract_load_record_count intnull comment 'The record count of the data set when loading the data file.',
Copy file name to clipboardExpand all lines: dbscripts/postgresql_process_tracker.sql
+32-12Lines changed: 32 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -283,37 +283,57 @@ create unique index location_lkup_udx01
283
283
createunique indexlocation_lkup_udx02
284
284
on location_lkup (location_path);
285
285
286
-
createtableextract_tracking
286
+
createtableprocess_tracking.extract_tracking
287
287
(
288
288
extract_id serialnot null
289
289
constraint extract_tracking_pk
290
290
primary key,
291
291
extract_filename varchar(750) not null,
292
292
extract_location_id integernot null
293
293
constraint extract_tracking_fk01
294
-
references location_lkup,
294
+
referencesprocess_tracking.location_lkup,
295
295
extract_process_run_id integer
296
296
constraint extract_tracking_fk03
297
-
references process_tracking,
297
+
referencesprocess_tracking.process_tracking,
298
298
extract_status_id integer
299
299
constraint extract_tracking_fk02
300
-
references extract_status_lkup,
301
-
extract_registration_date_time timestampnot null
300
+
referencesprocess_tracking.extract_status_lkup,
301
+
extract_registration_date_time timestampnot null,
302
+
extract_write_low_date_time timestamp,
303
+
extract_write_high_date_time timestamp,
304
+
extract_write_record_count integer,
305
+
extract_load_low_date_time timestamp,
306
+
extract_load_high_date_time timestamp,
307
+
extract_load_record_count integer
302
308
);
303
309
304
-
comment on table extract_tracking is 'Tracking table for all extract/staging data files.';
310
+
comment on table process_tracking.extract_tracking is 'Tracking table for all extract/staging data files.';
311
+
312
+
comment on column process_tracking.extract_tracking.extract_filename is 'The unique filename for a given extract from a given source.';
313
+
314
+
comment on column process_tracking.extract_tracking.extract_location_id is 'The location where the given extract can be found.';
315
+
316
+
comment on column process_tracking.extract_tracking.extract_process_run_id is 'The process that registered or created the extract file.';
317
+
318
+
comment on column process_tracking.extract_tracking.extract_status_id is 'The status of the extract.';
319
+
320
+
comment on column process_tracking.extract_tracking.extract_registration_date_time is 'The datetime that the extract was loaded into extract tracking.';
321
+
322
+
comment on column process_tracking.extract_tracking.extract_write_low_date_time is 'The lowest datetime of the data set as noted when writing the data file.';
323
+
324
+
comment on column process_tracking.extract_tracking.extract_write_high_date_time is 'The highest datetime of the data set as noted when writing the data file.';
325
+
326
+
comment on column process_tracking.extract_tracking.extract_write_record_count is 'The record count of the data set as noted when writing the data file.';
305
327
306
-
comment on column extract_tracking.extract_filename is 'The unique filename for a given extract from a given source.';
328
+
comment on column process_tracking.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.';
307
329
308
-
comment on column extract_tracking.extract_location_id is 'The location where the given extract can be found.';
330
+
comment on column process_tracking.extract_tracking.extract_load_high_date_time is 'The highest datetime of the data set as noted when loading the data file.';
309
331
310
-
comment on column extract_tracking.extract_process_run_id is 'The process that registered or created the extract file.';
332
+
comment on column process_tracking.extract_tracking.extract_load_record_count is 'The record count of the data set when loading the data file.';
311
333
312
-
comment on column extract_tracking.extract_status_id is 'The status of the extract.';
334
+
altertableprocess_tracking.extract_tracking owner to pt_admin;
313
335
314
-
comment on column extract_tracking.extract_registration_date_time is 'The datetime that the extract was loaded into extract tracking.';
0 commit comments