7.3.1 Loading Holidays

On an annual basis, you must 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 Sample KDD_CAL_HOLIDAY Table Loading Script 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/
2017',
'MM/DD/YYYY'), 'New Year''s Day - 2017', 'C');
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT,
HLDY_NM,
HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '01/16/
2017',
'MM/DD/YYYY'), 'Martin Luther King Jr.''s Birthday
- 2017', 'C');
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT,
HLDY_NM,
HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '02/20/
2017',
'MM/DD/YYYY'), 'President''s Day - 2017', 'C');
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT,
HLDY_NM,
HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '04/14/
2017',
'MM/DD/YYYY'), 'Good Friday - 2017', 'C');
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT,
HLDY_NM,
HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '05/29/
2017',
'MM/DD/YYYY'), 'Memorial Day - 2017', 'C');
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT,
HLDY_NM,
HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '07/04/
2017',
'MM/DD/YYYY'), 'Independence Day - 2017', 'C');
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT,
HLDY_NM,
HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '09/04/
2017',
'MM/DD/YYYY'), 'Labor Day - 2017', 'C');
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT,
HLDY_NM,
HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '11/22/
2017',
'MM/DD/YYYY'), 'Thanksgiving Day - 2017', 'C');
INSERT INTO KDD_CAL_HOLIDAY ( CLNDR_NM, CLNDR_DT,
HLDY_NM,
HLDY_TYPE_CD ) VALUES ( 'SYSCAL', TO_DATE( '12/25/
2017',
'MM/DD/YYYY'), 'Christmas Day - 2017', 'C');
COMMIT;

Table 7-1 KDD_CAL_HOLIDAY

Column Name Description
CLNDR_NM Specific calendar name.
CLNDR_DT Date that is a holiday.
HLDY_NM Holiday name , such as 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

Note:

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.
.