Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trace # of New Rows added to Table in Load

I have a script that loads only new records from a Source table into a QVD.  I want to be able to state the # of new rows that are being loaded in a Trace Statement.  See below for an example.

Sales:
Load ID,*

From QVD;

TRACE New Rows being loaded;

CONCATENATE (Sales)

Sales:

Load ID,*

From Source

WHERE NOT EXIST ID;

TRACE "x" rows loaded into Sales;

1 Solution

Accepted Solutions
eduardo_sommer
Partner - Specialist
Partner - Specialist

Hi Michael

You can use the function NoOfRows(NameOfTable)

After the first load, you assign NoOfRows to a varable, trace the value and do the same after the second load

Let vNumberOfRows = NoOfRows(Sales);

Trace $(vNumberOfRows);

Eduardo

View solution in original post

3 Replies
eduardo_sommer
Partner - Specialist
Partner - Specialist

Hi Michael

You can use the function NoOfRows(NameOfTable)

After the first load, you assign NoOfRows to a varable, trace the value and do the same after the second load

Let vNumberOfRows = NoOfRows(Sales);

Trace $(vNumberOfRows);

Eduardo

MK_QSL
MVP
MVP

You need to create a Variable like below

Let vNoOfRows = NoOfRows('TableName');

Trace $(vNoOfRows);

Anonymous
Not applicable
Author

I had to put a If statement to show 0 row if none were added but it worked.  Thanks for the quick response.

Sales:
Load ID,*

From QVD;

TRACE New Rows being loaded;

CONCATENATE (Sales)

Sales:

Load ID,*

From Source

WHERE NOT EXIST ID;

LET vNumberofRows = IF(LEN(TRIM(NoOfRows('Sales')))=0,0,NoOfRows('Sales'));

Trace $(vNumberofRows) rows added;