<?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 Re: Text files. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Text-files/m-p/986718#M964704</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi jonanthan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rather than an inline can you provide me the code when you are pulling the same data using loading a file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Oct 2015 11:21:49 GMT</pubDate>
    <dc:creator>raadwiptec</dc:creator>
    <dc:date>2015-10-06T11:21:49Z</dc:date>
    <item>
      <title>Text files.</title>
      <link>https://community.qlik.com/t5/QlikView/Text-files/m-p/986711#M964697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have text data file as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its only a sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id=transit secs="2010-03-07 11:36:44" route=6 mk=10 username=sam type=on schedule&lt;/P&gt;&lt;P&gt;id=peek secs="2010-03-07 11:36:44" route=9 mk=10 username=sam type=on schedule&lt;/P&gt;&lt;P&gt;id=dest secs="2010-03-07 11:36:44" route=10 mk=10 username=sam type=on schedule&lt;/P&gt;&lt;P&gt;id= arr secs="2010-03-07 11:36:44" route=12 mk=10 username=sam type=on schedule&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the actual file is around&amp;nbsp; 15MB with the similar kind of delimited space structure.&lt;/P&gt;&lt;P&gt;so here I tried to do a cross table but it does not make the data structure good enough&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so if Iam able to take just the Id part i.e without =transit .similarly secs part excluding timespamp..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any suggestions here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 13:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Text-files/m-p/986711#M964697</guid>
      <dc:creator>raadwiptec</dc:creator>
      <dc:date>2015-10-02T13:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Text files.</title>
      <link>https://community.qlik.com/t5/QlikView/Text-files/m-p/986712#M964698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBetween(@1,'id=',' secs') as id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBetween(@1,'secs=', ' route') as secs,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBetween(@1,'route=',' mk') as route,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBetween(@1,'mk=',' username') as mk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBetween(@1,'username=',' type') as username,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(@1,'=',-1) as schedule&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 15:57:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Text-files/m-p/986712#M964698</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-10-02T15:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Text files.</title>
      <link>https://community.qlik.com/t5/QlikView/Text-files/m-p/986713#M964699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't get any results ..it is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the source is a flat file and data is as below&lt;/P&gt;&lt;P&gt;for example:-&lt;/P&gt;&lt;P&gt;id=transit secs="2010-03-07 11:36:44" route=6 mk=10 username=sam type=on schedule. I am trying split each of them as a column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex&lt;/P&gt;&lt;P&gt;id =transit -- so id is a column here and 'transit' is the value&lt;/P&gt;&lt;P&gt;secs="2010-03-07 11:36:44" - so here I want to make 'secs' as the column and 2010-03-07 11:36:44" this is the value and this value may change accordingly with different timestamps and dates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 06:53:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Text-files/m-p/986713#M964699</guid>
      <dc:creator>raadwiptec</dc:creator>
      <dc:date>2015-10-05T06:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Text files.</title>
      <link>https://community.qlik.com/t5/QlikView/Text-files/m-p/986714#M964700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need to use the two parameter subfield() and a generic load. But you will also need to prevent the subfield splitting the date and time and the 'on schedule' value. The generic load will also need some sort of row ID. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// load the source with some mangling to handle the edge cases&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Raw:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;// replace ' ' inside quotes with '_'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD 'row=' &amp;amp; RowNo() &amp;amp; ' ' &amp;amp; SubField(Fields, '"', 1) &amp;amp; Replace(SubField(Fields, '"', 2), ' ', '_') &amp;amp; SubField(Fields,'"', 3) As Fields &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;// replace the ' ' in 'on schedule'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Replace(Fields, ' schedule', '_schedule') As Fields&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Fields Inline&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Fields&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; id=transit secs="2010-03-07 11:36:44" route=6 mk=10 username=rob type=on schedule&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; id=peek secs="2010-03-07 11:36:44" mk=3 route=9 username=joe type=off schedule&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; id=dest username=sam secs="2010-03-07 11:36:44" route=10 mk=10 type=on schedule&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; id=arr secs="2010-03-08 11:51:30" route=12 mk=10 username=sam type=on schedule&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// extract the data as name value pairs&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;T_Data:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD SubField(ValuePair, '=', 1) As Name,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Replace(SubField(ValuePair, '=', 2), '_', ' ') As Value,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SubField(SubField(Fields, ' ', 1), '=', 2) As _row&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Fields,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SubField(Fields, ' ') As ValuePair&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Raw;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//Convert the names to field names&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Data:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Generic LOAD _row, Name, Value&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident T_Data;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Clean up&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table T_Data;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table Raw;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 13:24:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Text-files/m-p/986714#M964700</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-10-05T13:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Text files.</title>
      <link>https://community.qlik.com/t5/QlikView/Text-files/m-p/986715#M964701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The previous script will create a star type structure. It may be ugly, but it does work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="t1.png" class="jive-image image-1" height="291" src="https://community.qlik.com/legacyfs/online/100969_t1.png" style="height: 290.637px; width: 446px;" width="446" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you cannot save it in a qvd. If that is your goal, you will need to fold the star down into a single table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Final:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NoConcatenate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * Resident Data.row;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join(Final) LOAD * Resident Data.id;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join(Final) LOAD * Resident Data.secs;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join(Final) LOAD * Resident Data.route;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join(Final) LOAD * Resident Data.mk;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join(Final) LOAD * Resident Data.username;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join(Final) LOAD * Resident Data.type;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table Data.row;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table Data.id;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table Data.secs;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table Data.route;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table Data.mk;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table Data.username;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table Data.type;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Field _row;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note this will &lt;SPAN style="text-decoration: underline;"&gt;not&lt;/SPAN&gt; create a more efficient model, but it will put everything in a single table which could be saved to a qvd or qvx file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 13:30:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Text-files/m-p/986715#M964701</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-10-05T13:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Text files.</title>
      <link>https://community.qlik.com/t5/QlikView/Text-files/m-p/986716#M964702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi jonanthan ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iam not able to understand your code..? Are you trying to make a table for each column?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD 'row=' &amp;amp; RowNo() &amp;amp; ' ' &amp;amp; SubField(Fields, '"', 1) &amp;amp; Replace(SubField(Fields, '"', 2), ' ', '_') &amp;amp; SubField(Fields,'"', 3) As Fields &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;what is this subfield here..&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 07:10:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Text-files/m-p/986716#M964702</guid>
      <dc:creator>raadwiptec</dc:creator>
      <dc:date>2015-10-06T07:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Text files.</title>
      <link>https://community.qlik.com/t5/QlikView/Text-files/m-p/986717#M964703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and also what should be in the place of field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex: when I try to import the file into qlikview I taken the none option ..so my header looks like @1,@2 etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if I choose embedded then my column looks like id=transit,...etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 07:17:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Text-files/m-p/986717#M964703</guid>
      <dc:creator>raadwiptec</dc:creator>
      <dc:date>2015-10-06T07:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Text files.</title>
      <link>https://community.qlik.com/t5/QlikView/Text-files/m-p/986718#M964704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi jonanthan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rather than an inline can you provide me the code when you are pulling the same data using loading a file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 11:21:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Text-files/m-p/986718#M964704</guid>
      <dc:creator>raadwiptec</dc:creator>
      <dc:date>2015-10-06T11:21:49Z</dc:date>
    </item>
  </channel>
</rss>

