pct icon indicating copy to clipboard operation
pct copied to clipboard

Add ability to enable triggers during data load & specify data file name per table

Open ntreeby opened this issue 2 years ago • 3 comments

  1. The PCTLoadData task uses the Data Administration default settings, which disable schema triggers - including replication triggers - when loading data. As a result, records loaded in this way are not being pushed to our replication targets, resulting in errors in our reports.

It would be beneficial to be able to selectively enable triggers (either "regular" triggers and/or replication triggers) when loading data.

  1. As well as being able to specify a list of tables for PCTLoadData with <Table> tags, it would be useful to be able to: a. Specify the file name (within the srcDir) to load. b. Allow multiple instances of the same table to be listed, if there are multiple .d files for that table to load.

ntreeby avatar Mar 22 '22 18:03 ntreeby

  1. How do you tell Progress not to disable triggers via the data dictionary ? Or were you using plain ABL to load data ?
  2. It's not clearly documented, but you can use <fileset> in PCTLoadData.

gquerret avatar Mar 22 '22 18:03 gquerret

  1. Per the comments in the header of prodict/dump/_loddata.p (11.7.6):
  user_env[5] = comma separated list of table numbers of tables not to disable
                triggers for. We'll disable triggers for all other tables.
                May bet called by old version of load_d.p with old method:
                comma separated list of "y" (yes) or "n" (no) which
                corresponds to file list in user_env[1], indicating for each,
                whether triggers should be disabled when the dump is done.

  1. How do I match up the <fileset> entries with my list of tables?

ntreeby avatar Mar 22 '22 18:03 ntreeby

  1. I won't have time to introduce a new attribute in the coming days, but feel free to open a pull request if you want. Otherwise, you can use the callbacks to override user_env[5] in your load data context.
  2. The trailers are read by loaddata.p

gquerret avatar Mar 22 '22 20:03 gquerret