Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Venkatesh_Yellu11
Contributor III
Contributor III

Loopscript for fetching insert records by incremental load

we have multiple tables with different columns with the single script i want to fetch required columns from required table . for each table for each QVD  the primary key column same in all the tables . 

Labels (2)
2 Replies
BIAKS
Creator
Creator

Hi, can you elaborate? Are you looking for something like this:

For Each File in Filelist ('$(vQVDFolder)'&'*.qvd')
	Files:
	Load 
		SubField('$(File)','/',4) as QvdName,
		FileTime( '$(File)' ) as FileTime,
	    FileSize( '$(File)' )/(1024*1024) as FileSize
	Autogenerate 1;
	
	Header:
	LOAD
		CreatorDoc&SubField('$(File)','/',4) as KEY,
		SubField('$(File)','/',4) as QvdName,
	    NoOfRecords,
	    CreatorDoc as AppId
	FROM [$(File)]
	(XmlSimple, table is QvdTableHeader);
	
	Fields_Temp:
	LOAD
		SubField('$(File)','/',4) as QvdName,
	    "FieldName",
	    %Key_QvdFieldHeader_59D66ED49CFF179D
	FROM [$(File)]
	(XmlSimple, table is [QvdTableHeader/Fields/QvdFieldHeader]);
Next File;
Venkatesh_Yellu11
Contributor III
Contributor III
Author

if suppose in a table having 20 columns but i using only 10 columns remain columns are unnecessary to load into QVD's . so i want to load only necessary columns from each table to create QVD's and incremental load