Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

MalcolmCICWF
Contributor II

Qlik Sense Resident Table Load not Working

I am running into an issues that I am having a problem figuring out. I am loading a table in script from and Excel file and then trying to create a secondtable where I will do some other data manipulation, but this second table will not load. After loading the data, only the first table exists. Am I doing something wrong? I have done this many times in Qlikview, is there a bug in Qlik Sense?

[TableImport]:
LOAD
  [Status],
  [Location],
  [Created By(Name)] as CreatedBy,
  [Ticket #] as TicketNum,
  [Summary],
     Date(Timestamp#([Create Date],'YYYY-MM-DD @ hh:mm TT')) as CreateDate,
     Time(Timestamp#([Create Date],'YYYY-MM-DD @ hh:mm TT')) as CreateTime,
  [Close Date],
  [Assigned to],
  [Request Type],
  [Categorization]
    
FROM [lib://Apps/ServiceDesk.xlsx]
(ooxml, embedded labels, table is [Spiceworks Report]);


[ServiceDesk]:
LOAD
  [Status],
  [Location],
  CreatedBy,
  TicketNum,
  [Summary],
     CreateDate,
     CreateTime,
  [Close Date],
  [Assigned to],
  [Request Type],
  [Categorization]
    
Resident TableImport;

// Drop table TableImport;

1 Solution

Accepted Solutions
MVP
MVP

Re: Qlik Sense Resident Table Load not Working

If the 2 tables have the same number and names of fields Qlik will concatenate (like a SQL union all) the tables and you get all records in first one

Add a noconcatenate to the second one.

[ServiceDesk]:

noconcatenate

LOAD

     ....

6 Replies
satishkurra
Valued Contributor II

Re: Qlik Sense Resident Table Load not Working

I don't see any problem here...

If you can put the error screen shot it will be helpful to understand much better

MVP
MVP

Re: Qlik Sense Resident Table Load not Working

If the 2 tables have the same number and names of fields Qlik will concatenate (like a SQL union all) the tables and you get all records in first one

Add a noconcatenate to the second one.

[ServiceDesk]:

noconcatenate

LOAD

     ....

Employee
Employee

Re: Qlik Sense Resident Table Load not Working

They seem to be loading the same kind of data because all the columns are the same. Maybe you want this ?

If so, you can differentiate the records by adding a new field with a different constant value for each load. Then you can slice the data sets by this new field 'Source' with values of your choice (in my ex below  file1, file2)

[TableImport]:
LOAD

  'File1'  as Source,
  [Status],
  [Location],
  [Created By(Name)] as CreatedBy,
  [Ticket #] as TicketNum,
  [Summary],
     Date(Timestamp#([Create Date],'YYYY-MM-DD @ hh:mm TT')) as CreateDate,
     Time(Timestamp#([Create Date],'YYYY-MM-DD @ hh:mm TT')) as CreateTime,
  [Close Date],
  [Assigned to],
  [Request Type],
  [Categorization]
    
FROM [lib://Apps/ServiceDesk.xlsx]
(ooxml, embedded labels, table is [Spiceworks Report]);


[ServiceDesk]:
LOAD

  'File2'  as Source,
  [Status],
  [Location],
  CreatedBy,
  TicketNum,
  [Summary],
     CreateDate,
     CreateTime,
  [Close Date],
  [Assigned to],
  [Request Type],
  [Categorization]
    
Resident TableImport;

// Drop table TableImport;

MalcolmCICWF
Contributor II

Re: Qlik Sense Resident Table Load not Working

I guess I never had this issue in QlikView. I plan on adding some fields based on calculations, but I was just testing and noticed they were combining into 1 table.

MVP
MVP

Re: Qlik Sense Resident Table Load not Working

not an issue, it's by design

automatic concat for same number and names of fields

concatenate to force concat also for different number and/or names

noconcatenate to force no concat

MalcolmCICWF
Contributor II

Re: Qlik Sense Resident Table Load not Working

Well this seemed to work, I guess I just never ran into this before Qlik Sense. Typically if I created a second table referencing some/all the fields, then dropped the first table, the second one would be left. This makes it look as if ignored the drop table statement.

Either way, the NoConcatenate seems to have worked here

Community Browser