<?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 Indexing Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126785#M630041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any of you help me to index this code in fields and fieldvalues.&lt;/P&gt;&lt;P&gt;This is one string from a log file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need a backend script to decode into fields and fieldnames for qlikview&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-ZA" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #44546a;"&gt;Jul 20 20:06:27 firewall.ip date=2016-07-20 time=21:15:56 devname=FIREWALL.HOSTNAME devid=FIREWALL.SERIAL.NUMBER logid=0000000013 type=traffic subtype=forward level=notice vd=root srcip=SOURCE.IP srcport=1031 srcintf="SOURCE.INTERFACE" dstip=DESTINATION.IP dstport=514 dstintf="wan1" sessionid=47632605 proto=17 action=deny policyid=0 dstcountry="South Africa" srccountry="Reserved" trandisp=noop service="SYSLOG" duration=0 sentbyte=0 rcvdbyte=0 sentpkt=0 vpn="VPN.TUNNEL.NAME" vpntype=ipsec-static appcat="unscanned" crscore=30 craction=131072 crlevel=high&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jul 2016 13:54:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-07-22T13:54:27Z</dc:date>
    <item>
      <title>Indexing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126785#M630041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any of you help me to index this code in fields and fieldvalues.&lt;/P&gt;&lt;P&gt;This is one string from a log file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need a backend script to decode into fields and fieldnames for qlikview&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-ZA" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #44546a;"&gt;Jul 20 20:06:27 firewall.ip date=2016-07-20 time=21:15:56 devname=FIREWALL.HOSTNAME devid=FIREWALL.SERIAL.NUMBER logid=0000000013 type=traffic subtype=forward level=notice vd=root srcip=SOURCE.IP srcport=1031 srcintf="SOURCE.INTERFACE" dstip=DESTINATION.IP dstport=514 dstintf="wan1" sessionid=47632605 proto=17 action=deny policyid=0 dstcountry="South Africa" srccountry="Reserved" trandisp=noop service="SYSLOG" duration=0 sentbyte=0 rcvdbyte=0 sentpkt=0 vpn="VPN.TUNNEL.NAME" vpntype=ipsec-static appcat="unscanned" crscore=30 craction=131072 crlevel=high&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 13:54:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126785#M630041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-22T13:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126786#M630042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was too lazy to work out the whole script for you.&lt;/P&gt;&lt;P&gt;I include enough fields so you could see:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fixed width fields (date and time)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fields terminated by a space (devname and devid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fields with data in double quotes that might contain a space (dstcountry)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 18:17:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126786#M630042</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2016-07-22T18:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126787#M630043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;Try this;&lt;/P&gt;&lt;P&gt;Generic&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;LogID,&lt;/P&gt;&lt;P&gt;SubField(Log,'=',1) as Attribute,&lt;/P&gt;&lt;P&gt;SubField(Log,'=',2) as Value;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;* Where Index(Log,'=');&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;LogID,&lt;/P&gt;&lt;P&gt;SubField(Log,' ') as Log;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LogID,Log&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,'Jul 20 20:06:27 firewall.ip date=2016-07-20 time=21:15:56 devname=FIREWALL.HOSTNAME devid=FIREWALL.SERIAL.NUMBER logid=0000000013 type=traffic subtype=forward level=notice vd=root srcip=SOURCE.IP srcport=1031 srcintf="SOURCE.INTERFACE" dstip=DESTINATION.IP dstport=514 dstintf="wan1" sessionid=47632605 proto=17 action=deny policyid=0 dstcountry="South Africa" srccountry="Reserved" trandisp=noop service="SYSLOG" duration=0 sentbyte=0 rcvdbyte=0 sentpkt=0 vpn="VPN.TUNNEL.NAME" vpntype=ipsec-static appcat="unscanned" crscore=30 craction=131072 crlevel=high'&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You get a really funky data model;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Generic model.jpg" class="jive-image image-1" src="/legacyfs/online/132294_Generic model.jpg" style="height: 361px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;It works but if you want to tidy things up into one table then this further script will do so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vTabName = TableName(0);&lt;/P&gt;&lt;P&gt;RENAME Table $(vTabName) to LogTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vCnt = NoOfTables();&lt;/P&gt;&lt;P&gt;trace $(vCnt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i = 1 to $(vCnt)-1&lt;/P&gt;&lt;P&gt;let vOldTabName = TableName($(i));&lt;/P&gt;&lt;P&gt;let vNewTabName = Text('Table' &amp;amp;$(i));&lt;/P&gt;&lt;P&gt;RENAME Table $(vOldTabName) to $(vNewTabName);&lt;/P&gt;&lt;P&gt;Next i;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i = 1 to $(vCnt)-1&lt;/P&gt;&lt;P&gt;Let vJoinTable =Text('Table' &amp;amp; $(i));&lt;/P&gt;&lt;P&gt;Left Join(LogTable)&lt;/P&gt;&lt;P&gt;Load * Resident $(vJoinTable);&lt;/P&gt;&lt;P&gt;DROP Table $(vJoinTable);&lt;/P&gt;&lt;P&gt;next i;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the model looks a bit more conventional&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="model.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/132295_model.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jul 2016 09:46:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126787#M630043</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2016-07-24T09:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126788#M630044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nice and simple answer&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 11:19:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126788#M630044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-25T11:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126789#M630045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This answer is nice and simple, but doesn't get data where there is a space between double quotes (South Africa)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 12:47:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Indexing-Script/m-p/1126789#M630045</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2016-07-25T12:47:49Z</dc:date>
    </item>
  </channel>
</rss>

