8.2.1 Loading Holidays

Typically, on an annual basis, you populate holidays for the upcoming calendar year into the Behavior Detection KDD_CAL_HOLIDAY database table. This ensures that the table contains holidays for at least the next year.

The following snippet provides an example of a SQL script for loading the table.

INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT, HLDY_NM,HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '01/ 01/2006', 'MM/DD/YYYY'), 'New Year''s Day - 2006', 'C'); 
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT, HLDY_NM,HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '01/16/2006','MM/DD/YYYY'), 'Martin Luther King Jr.''s Birthday - 2006', 'C'); 
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT, HLDY_NM,HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '02/20/2006','MM/DD/YYYY'), 'President''s Day - 2006', 'C'); 
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT, HLDY_NM,HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '04/ 14/2006', 'MM/DD/YYYY'), 'Good Friday - 2006',
        'C'); 
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT, HLDY_NM,HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '05/ 29/2006', 'MM/DD/YYYY'), 'Memorial Day - 2006',
        'C'); 
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT, HLDY_NM,HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '07/04/2006','MM/DD/YYYY'), 'Independence Day - 2006', 'C'); INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT, HLDY_NM,HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '09/ 04/2006', 'MM/DD/YYYY'), 'Labor Day - 2006',
        'C');  
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT, HLDY_NM,HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '11/22/2006','MM/DD/YYYY'), 'Thanksgiving Day - 2006', 'C'); 
    
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT, HLDY_NM,HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '12/

The following table provides the contents of the KDD_CAL_HOLIDAY table.

Column Name Description
CLNDR_NM Specific calendar name.
CLNDR_DT Date that is a holiday.
HLDY_NM Holiday name (for example, Thanksgiving or Christmas).
HLDY_TYPE_CD Indicates whether the business is Closed (C) or Shortened (S).
SESSN_OPN_TM Indicates the opening time of the trading session for a shortened day. The format is HHMM.
SESSN_CLS_TM Indicates the closing time of the trading session for a shortened day. The format is HHMM.
SESSN_TM_OFFSET_TX Indicates the timezone offset for SESSN_OPN_TM and SESSN_CLS_TM.

When the system runs the set_mantas_date.sh script, it queries the KDD_CAL_HOLIDAY table for the maximum date for each calendar in the table. If the maximum date is less than 90 days ahead of the provided date, the process logs a warning message that the specific calendar's future holidays need updating. If any calendars have no holiday records, the system logs a Warning message that the specific calendar has no recorded holidays for the appropriate date range.