Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
MVP
MVP

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
Gysbert_Wassenaar

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
Kushal_Chawda

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

Chanty4u
MVP
MVP
Author

for example

if i load excel  data into qlikview.

i have some amount of data.

so how shud i knw?

avinashelite

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

jagan
Luminary Alumni
Luminary Alumni

Hi,

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

Example:

Data:

LOAD

*

FROM DAtaSource;

LET vRowsCount = NoOfRows('Data');

Regards,

jagan.

Chanty4u
MVP
MVP
Author

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?

jagan
Luminary Alumni
Luminary Alumni

Hi,

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

Example:

Data:

LOAD

*

FROM DAtaSource;

LET vFieldsCount = NoOfFields('Data');

Regards,

jagan.

Chanty4u
MVP
MVP
Author

did u chk the code which i posted above?

i can i see in the front end  mentioned variables?

Kushal_Chawda

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.

jagan
Luminary Alumni
Luminary Alumni

Hi,

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

Regards,

jagan.