[ic] Set variable to query result at start-up?

Davor Ocelic docelic at mail.inet.hr
Thu Feb 14 14:31:40 EST 2008


On Thu, Feb 14, 2008 at 02:13:50PM -0500, Jeff Boes wrote:
> 
> >
> > On Feb 14, 2008, at 1:00 PM, Jeff Boes wrote:
> >
> >> Specifically, I want to set:
> >>
> >> UI_DATE_BEGIN
> >>
> >> to the first year represented by transactions.order_date, e.g.,
> >>
> >> select min(to_date(order_date,'YYYY')) from transactions;
> >>
> >> The only approach I've thought up (which I haven't tried yet) would be
> >> to define a module with a BEGIN block[1], and "Require" it in the
> >> interchange.cfg or catalog.cfg. Are there other approaches?
> 
> I've determined this won't work, because the database connection isn't
> established at the time I need it to be in order to run the query. I
> really have to do this inside the catalog.cfg somehow, and after the
> point where the Database directives have been processed.

If IC Jobs are mimicking Unix cron in a way, how about adding support
for special time specification in style of Unix cron, but instead of
@reboot like in Cron, we'd call it @startup and/or @reconfig.
It would run in catalog context, after catalog is configured,
and once for @startup, or each time for @reconfig.

-doc


More information about the interchange-users mailing list