Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

No of records in QVX file

Hi,

I am validating the records from source data count with qvx data count.

Is there any way to find the count of qvx records.

Regards,

Kumar

9 Replies
alexandros17
Partner - Champion III
Partner - Champion III

There is the function

QvdNoOfRecords ('MyFile.qvd')

try with qvx ....let me know

Clever_Anjos
Employee
Employee

QvdNoOfRecords does not support qvx files.

You should to load the qvx, NoOfRows('table1') will return how many rows were loaded

Anonymous
Not applicable
Author

Hi Clever Anjos,

Let me clarify you here, I am getting Qvx files from infrormatica and I want to test it here itself. Once we get conformation then I have to move next step. this is my concern.

Regards,

kumar

Clever_Anjos
Employee
Employee

If you want to test if the file is there please use

if Alt(FileSize('file.qvx'),0) <>  0 then

   load * from ['file.qvx'](qvx);

end if;


Clever_Anjos
Employee
Employee

I´ve seen that you trying to do this using Linux (Re: Record counts in QVX file using unix)

grep -A 5 --binary-files=text "</QvxTableHeader>" y.qvx | wc-l

if result >2 there is data into that file

Anonymous
Not applicable
Author

Hi,

i tried with below command and getting result 6. but i have lot more records in that corresponding table

grep -A 5 --binary-files=text "</QvxTableHeader>" fact_lead_status_inserts.qvx | wc -l


Regards,

Kumar

Clever_Anjos
Employee
Employee

You need the exact quantity of lines or just test if > 0?

Clever_Anjos
Employee
Employee

This script is supposed to work, no warranties

f=x.qvx # your file, maybe you want to use $1

p=$(grep -n --binary-files=text "</QvxTableHeader>" $f| cut -d: -f1)

t=$(cat $f |wc -l)

echo `expr $t - $p`

MarcoWedel

‌LOAD Max(RecNo()) as NumberOfRecords

FROM your.qvx ...

maybe ?

regards

Marco