2 Replies Latest reply: Aug 10, 2018 7:46 AM by Jonathan Dienst RSS

    top record qliksense

    Capricon User

      i have qliksense file in this script  i load like this


      binary [lib://t/dataaaa1.qvw];

      SET ThousandSep=',';

      SET DecimalSep='.';

      SET MoneyThousandSep=',';

      SET MoneyDecimalSep='.';

      SET MoneyFormat='$#,##0.00;($#,##0.00)';

      SET TimeFormat='h:mm:ss TT';

      SET DateFormat='DD-MMM-YYYY';

      SET TimestampFormat='DD-MMM-YYYY h:mm:ss[.fff] TT';

      SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

      SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

      SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

      SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

      SET FirstWeekDay=6;

      SET BrokenWeeks=1;

      SET ReferenceDay=0;

      SET FirstMonthOfYear=1;

      SET CollationLocale='en-US';



      like i directly load from qvw file .. now i want to restrict data on script level how i do this .. i dont want do limitation on table .. want to do script on qliksense.. also i dont have separtate qvds.. i just load data from path ..



      how i get top 10 records ..

        • Re: top record qliksense
          Gabor Tarnoczai



          You can use the first n before the load statement, use it with order by clause.



          First 10



          Resident Table

          order by [yourExpectations] [asc/desc]



          • Re: top record qliksense
            Jonathan Dienst

            First n does not with a binary load unfortunately. You have two options:


            1) After binary load, resident load the required tables with some filters, then drop the original table and rename the new resident loaded table to the name of the original table.*


            2) Export all the content to be loaded to QVDs, and filter the data when loading the QVDs.


            * Actually the table names dont matter once the load is complete, so the table renaming may not be needed unless you are performing further transformations om the resident tables after filtering.