Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

masive load

Hi everyone...  i would like to load n files which have same estructure but their extentions are differents... and also... the name of which sheet in excel can be named different.....

how i can load in a masive load way?

thanks...

AE

1 Reply
Not applicable
Author

You need to create a source table list first and then load can be triggered.

SourcesLocation:

LOAD * Inline [

FileName,Source,Location,Sheet

SalesContry.xls,xls,D:\Data\,Sales

SalesCountry.csv,csv,D:\Data\,NA

SalesCountries.xlx,xls,D:\Data\,Sales

];

For i = 1 to NoOfRows('SourcesLocation')-1

  vFile = Peek('Location',$(i),'SourcesLocation')&'\'&Peek('FileName',$(i),'SourcesLocation');

  vType = Peek('Source',$(i),'SourcesLocation');

  vSheet = Peek('Sheet',$(i),'SourcesLocation');

  if $(vSheet) = 'xls' then

  SalesLoad:

  LOAD SalesMan,

      SalesDate,

      SalesValue

  FROM $(vFile)

  (ooxml, embedded labels, header is 0 lines, table is $(vSheet));

  ELSE

  SalesLoad:

  LOAD SalesMan,

      SalesDate,

      SalesValue

  FROM $(vFile)

  (txt, codepage is 1252, embedded labels, delimiter is ',', msq);

  ENDIF

next

The If else conditions are based on load file types. You can add delimiter column to SourceLocation if that changes from sources.

Regards,

Kiran.