Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

kumarreddy257
Contributor

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

Re: No of records in QVX file

There is the function

QvdNoOfRecords ('MyFile.qvd')

try with qvx ....let me know

Employee
Employee

Re: No of records in QVX file

QvdNoOfRecords does not support qvx files.

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

kumarreddy257
Contributor

Re: No of records in QVX file

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

Employee
Employee

Re: No of records in QVX file

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;


Employee
Employee

Re: No of records in QVX file

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

kumarreddy257
Contributor

Re: No of records in QVX file

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

Employee
Employee

Re: No of records in QVX file

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

Employee
Employee

Re: No of records in QVX file

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`

Re: No of records in QVX file

‌LOAD Max(RecNo()) as NumberOfRecords

FROM your.qvx ...

maybe ?

regards

Marco

Community Browser