Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ijcornish
Contributor II
Contributor II

Loading data from 2 files, and merging them?

Hi,

I have a series of flat files, of which 2 are particularly troublesome... The Parent table has 99% of the data I want, but some of the rows have child data in Child (ColD).

The record in Child joins to ColC

Would this work in theory:-

[Child]:

Load [ChildA] as [ColC], [ChildB]

from <Filename>;

[tmpParent]:

Load [ColA], [ColB], [ColC]

from <Filename>;

[PArent];

Resident Load [ColA],[ColB], [ColC]

from tmpParent

LEFT JOIN

Resident Load [ColD] from Child;

(I should add that I'm away from my server for the weekend, and this is seriously bugging me!)

2 Replies
oknotsen
Master III
Master III

Not 100% sure what you are trying to do, but your resident is wrong to begin with.

Loading data from a previously loaded table ‒ Qlik Sense

But I think a resident is not needed at as you seem to be taking unneeded steps.


In your example it is unclear where field D is located. I am going to assume in the "Child" table.

I am also having some doubt about what the key field is between the two tables. I am guessing field C since you are renaming something to C

If so, this is what I think the script should look like:


[Parent]:

Load [ColA], [ColB], [ColC]

from <Filename>;

[Child]:

Left Join(Parent)

Load [ChildA] as [ColC], [ChildB], D

from <Filename>;

The end result will be a table called "Parent" with these fields:

ColA

ColB

ColC

ChildB

D

If this does not answer it for you, please be more clear about which table contains which fields and what should be the end result.

May you live in interesting times!
MarcoWedel

Hello Ian,

maybe this helps:

Hierarchy ‒ QlikView

regards

Marco