I hope this finds you well and in good health. I am currently using the below script to load data. A new file is created every quarter with the same file-name/fields which allows this data load loop to function.
My question is, if I decide to add a new field to the file this quarter (lets say date of birth) and added that field to the script below ... do I have to manually add that field to all past files or is there a function that will allow for this load loop to function where additional fields in new files are not present in the older ones.
Thank you in advance for your support 🙂
for each file in filelist('lib://RANDOM (SERVER-qlik-01_qliksupport)//Q*.xlsx')
"FIELD1", "FIELD2", Date#(mid(FileBaseName(),1,7),'QQ/YYYY') as Date, ' [$(file)]' as filename
from [$(file)] (ooxml, embedded labels, table is [TRAINEES]);
STORE TABLE INTO [lib://RANDOM (SERVER-qlik-01_qliksupport)//StorageSocial.qvd];