Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load Trace QVDs from Folder

Hi Guys,

I have an issue with loading QVDs from a folder. I have script which loads all the exiting QVDs and concatenate them into one large main QVD. Now the  script fails due to a missing field and now I want to know which QVD is correpted. So the question is where to put the traceing statement?

Script

GLEntry:
LOAD
''
as Origin_DB
AutoGenerate 0;

 
FOR EACH vYear IN FieldValueList('ReportYears')

CONCATENATE (GLEntry)
LOAD
Origin_DB & '-' & Origin_Entity & '-' & [G_L Account No_] as %AccountID,
Origin_DB & '-' & Origin_Entity & '-' & [Document No_] as %GLEntryDoc,
Num([Posting Date]) as %Date,
'GL-' &
Origin_DB & '-' & Origin_Entity & '-' & [Entry No_] as %Dimension,
Amount * (-1) as _AmountStage,
[VAT Amount] * (-1) as _VATAmountStage,
ApplyMap('MAPDBCountry',Origin_DB) as Country,
ApplyMap('MAPDBCurrency',Origin_DB) as Currency,
 
[Document No_] as DocumentNr,
Description as DocumentDescription,
Origin_DB,
Origin_Entity
FROM
$(vRaw_NAVD)*_GLEntry_$(vYear)*qvd
(
qvd);

NEXT

Thanks in advance

Robert

3 Replies
michael123
Partner - Creator
Partner - Creator

After the

FOR EACH ...?

Trace $(vYear )

Then check in log file where it crashes.

Anonymous
Not applicable
Author

Hi Michael,

Thanks but I need a statement that traces the QVD file from the folder which has a reading error.

Best regards,

Robert

michael123
Partner - Creator
Partner - Creator

Hi,

So is your objective to find which file is corrupted or to get the trace command? There is a difference between them. For the first you only need to check the last file loaded in the document logfile.

If it is the latter I would work with the FileList function and loop on the files in the catalogue you have your files in with a For each File in FileList... and then trace the file that way. You could also try catching ScriptError=11 which is Field is missing.