<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Python script Requirement : Holiday list updation in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-script-Requirement-Holiday-list-updation/m-p/466210#M8417</link>
    <description>&lt;P&gt;I have a regional level holiday list and source is a raw ITSM tools data where there is reported date and resolved date&lt;/P&gt;

&lt;P&gt;For ex : CSV file for holiday list&lt;BR /&gt;
App    Location               Des             Date&lt;BR /&gt;
App1  Pune                     Newyear     01/01/2020&lt;BR /&gt;
App2  Singapore            xxxxx          13/01/2020&lt;BR /&gt;
App3  Pune/Singapore  someday     14/01/2020&lt;/P&gt;

&lt;P&gt;What my python code should check for the location and App in the raw data and also the location and app in holiday list and based on that it should trigger if there is a holiday or not&lt;/P&gt;

&lt;P&gt;challenge : app3 has a holiday at both location at such case how to handle this&lt;/P&gt;

&lt;P&gt;I tired something initially like this:&lt;BR /&gt;
bt its throwing output as 'N' even when the holiday date and reported date matches&lt;/P&gt;

&lt;P&gt;for holiday in holidays:&lt;BR /&gt;
    day , month , year= holiday.split('/')&lt;BR /&gt;
    holidate = date(int(year) , int(month) , int(day))&lt;BR /&gt;
    logger.info('%s', holidate)&lt;BR /&gt;
    if holidate == each_date.date():&lt;BR /&gt;
        is_it_holiday = 'Y'&lt;BR /&gt;
    else:&lt;BR /&gt;
        is_it_holiday = 'N'&lt;BR /&gt;
result['is_it_holiday'] = is_it_holiday&lt;BR /&gt;
break&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 04:06:13 GMT</pubDate>
    <dc:creator>rijinc</dc:creator>
    <dc:date>2020-09-30T04:06:13Z</dc:date>
    <item>
      <title>Python script Requirement : Holiday list updation</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-script-Requirement-Holiday-list-updation/m-p/466210#M8417</link>
      <description>&lt;P&gt;I have a regional level holiday list and source is a raw ITSM tools data where there is reported date and resolved date&lt;/P&gt;

&lt;P&gt;For ex : CSV file for holiday list&lt;BR /&gt;
App    Location               Des             Date&lt;BR /&gt;
App1  Pune                     Newyear     01/01/2020&lt;BR /&gt;
App2  Singapore            xxxxx          13/01/2020&lt;BR /&gt;
App3  Pune/Singapore  someday     14/01/2020&lt;/P&gt;

&lt;P&gt;What my python code should check for the location and App in the raw data and also the location and app in holiday list and based on that it should trigger if there is a holiday or not&lt;/P&gt;

&lt;P&gt;challenge : app3 has a holiday at both location at such case how to handle this&lt;/P&gt;

&lt;P&gt;I tired something initially like this:&lt;BR /&gt;
bt its throwing output as 'N' even when the holiday date and reported date matches&lt;/P&gt;

&lt;P&gt;for holiday in holidays:&lt;BR /&gt;
    day , month , year= holiday.split('/')&lt;BR /&gt;
    holidate = date(int(year) , int(month) , int(day))&lt;BR /&gt;
    logger.info('%s', holidate)&lt;BR /&gt;
    if holidate == each_date.date():&lt;BR /&gt;
        is_it_holiday = 'Y'&lt;BR /&gt;
    else:&lt;BR /&gt;
        is_it_holiday = 'N'&lt;BR /&gt;
result['is_it_holiday'] = is_it_holiday&lt;BR /&gt;
break&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-script-Requirement-Holiday-list-updation/m-p/466210#M8417</guid>
      <dc:creator>rijinc</dc:creator>
      <dc:date>2020-09-30T04:06:13Z</dc:date>
    </item>
  </channel>
</rss>

