Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

"Piggyback LOAD" - troublesome in combination with a JOIN?

Hi,

I have just learnt about this kind of LOAD - well, I had read about it before, but I only really understood it now.

What I mean is things like this:

LOAD

         A & '|' & B as C;

LOAD

A,

D,

E as B;

SQL SELECT

...

...

;

This "piggyback LOAD" just replaces a field in the table that is loaded in the main LOAD statement here so you can already access the fields only  calculated in that LOAD without repeating any complicated formulas, thereby eliminating the corresp. potential for errors.

<=> It seems (we just tried this out in a scenario) that this can prove troublesome when combined with a JOIN.

=> Is that so? Can someone please shed some light on this?

In that scenario, there was sth. like this:

[Mapping table 1]:

MAPPING LOAD

...

...

;

[Mapping table 2]:

MAPPING LOAD

...

...

;

[Main_table_1]:

LOAD

         C,

         D,

        E

;

LEFT JOIN

LOAD

     A,

     B

Applymap('[Mapping table 1]', Applymap('[Mapping table 2]'

...

;

Since this did not seem to work for some mysterious reason (it had worked just like this yesterday), we tried to split that formula into two separate Applymap_commands by using suc a "piggyback load" - in the table_to_be_joined. That did not seem to work.

Thanks a lot!

Best regards,

DataNibbler

P.S.: Well, it seems I haven't understood it well - currently, in two instances, this replaces the entire table I have just loaded with a table that has just one field...

1 Reply
datanibbler
Champion
Champion
Author

OK, this is also solved.

I had been doing something wrong - the correct syntax must be

LOAD *, A&'|'&B as C;

LOAD

   ...

   ...

;

I had omitted the asterisk.

Best regards,

DataNibbler