Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Champion III
Champion III

RE:after-before

Hi all,

I want to know  the status of the document?

it means

how to know? 

1)the data after_reload  ?

2)the data before_reload?

3)no. of rows?

4)no.of columns?

thanks in advance:

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: RE:after-before

Everytime you load data you will have to create a file (at the end of the script so all your real data is loaded) in which you store how many records your tables contain at the end of that run. During the next reload you can load this data again and at the end add the new record counts again to that file. Using the data from this file you can compare between one reload and any previous reload.

Something like this should get you started:

For i = 0 to NoOfTables()-1

  LET vTableName = TableName($(i));

  For j = 1 To NoOfFields('$(vTableName)')

  LET vFieldName = FieldName($(j),'$(vTableName)');

  TableStats:

  LOAD

     '$(vTableName)' as TableName,

     NoOfRows('$(vTableName)') as RowCount,

     NoOfFields('$(vTableName)') as FieldCount,

     '$(vFieldName)' as FieldName,

     FieldValueCount('$(vFieldName)') as FieldValueCount

  AUTOGENERATE 1

  ;

  Next

Next

STORE TableStats INTO TableStats.qvd (qvd);


talk is cheap, supply exceeds demand

View solution in original post

22 Replies
Highlighted

Re: RE:after-before

data_after_reload and data_before_reload ? Do you mean to know number of rows before and after reload?

Highlighted
Champion III
Champion III

Re: RE:after-before

for example

if i load excel  data into qlikview.

i have some amount of data.

so how shud i knw?

Highlighted

Re: RE:after-before

you could use the document analyzer rite ??

or if you want to have in the  script level than for every reload you need calculate the number of rows and columns and store it in the QVD so that you can make a comparison of the same

Highlighted
MVP & Luminary
MVP & Luminary

Re: RE:after-before

Hi,

Try NoOfRows() to get the count of rows in the table.

Example:

Data:

LOAD

*

FROM DAtaSource;

LET vRowsCount = NoOfRows('Data');

Regards,

jagan.

Highlighted
Champion III
Champion III

Re: RE:after-before

hi  avi,

i hve used below code

let before_reload=now();

//load from QVD's

Employees:

LOAD Series,

     EmpID,

     Identifier,

     [Last Name],

     [First Name],

     Title,

     [Hire Date],

     Office,

     Extension,

     [Reports To],

     [Year Salary]

FROM

..\Datasources\Employees_large.qvd

(qvd);

let after_reload = now();

but i dont know  how can i see that defined variable values in front end?

Highlighted
MVP & Luminary
MVP & Luminary

Re: RE:after-before

Hi,

Try NoOfFields() to get the count of fields in the table.

Example:

Data:

LOAD

*

FROM DAtaSource;

LET vFieldsCount = NoOfFields('Data');

Regards,

jagan.

Highlighted
Champion III
Champion III

Re: RE:after-before

did u chk the code which i posted above?

i can i see in the front end  mentioned variables?

Highlighted

Re: RE:after-before

Employee:

Load *

From Table;

let vNoOfRows = NoOfRows('Data');

Details:

Load now() as Time,

        $(vNoOfRows ) as Rows,

        'Employee' as TableName

autogenerate 1;

Store Details into Path\DataLoadDetails.qvd;

drop table Details;

// Comment the Details Table code once you have created the QVD first time and run now the below code

Details:

Load now() as Time,

        $(vNoOfRows ) as Rows,

         'Employee' as TableName

autogenerate 1;

concatenate(Details)

Load Time,

         Rows,

        TableName

From Path\DataLoadDetails.qvd(qvd);

Store Details into Path\DataLoadDetails.qvd;

Create the Table box in front end and add the columns from Details table. You will be able to see the number of rows for that table during each reload.

If you want to do it for multiple table , use for loop.

Highlighted
MVP & Luminary
MVP & Luminary

Re: RE:after-before

Hi,

Create Text objects and put those variables or Settings -> variable Overview and check the value.

Regards,

jagan.