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

One field preventing concatenation of two tables

I am trying to concatenate two tables, which I have been able to successfully do up to a point. Salesforce is the source of the information.

The problem arises when I try and do the same LEFT JOIN on those individual tables. It is at this point that the [Record Owner] field which I am trying to add is NOT recognised as an identical field, and therefore the tables are not concatenated.

Below is a shortened version of the script


1st TABLE

Contacts:

LOAD Id as ContactId,

    AccountId,

    Email,

    Phone,

    Title,

    Inactive_Contact__c,

    OwnerId AS ContactOwnerID,

    Name AS ContactName;

SQL SELECT *

FROM Contact

WHERE AccountId != NULL;



RecordOwners:

LEFT JOIN (Contacts)

LOAD Id AS ContactOwnerID,

    Name AS [Record Owner];

SQL SELECT *

FROM User;




2nd TABLE

Contacts:

LOAD Id as ContactId,

    AccountId,

    Email,

    Phone,

    Title,

    Inactive_Contact__c,

    OwnerId AS ContactOwnerID,

    Name AS ContactName;

SQL SELECT *

FROM Contact

WHERE AccountId != NULL;

RecordOwners:

LEFT JOIN (Contacts)

LOAD Id AS ContactOwnerID,

    Name AS [Record Owner];

SQL SELECT *

FROM User;

There are other tables in my script, but this is how the two offending tables end up

export.png

12 Replies
Not applicable
Author

Hi Ernesto,

i tried this, but the new concatenated Contacts table did not load for some reason

It's as if ALL the contact data got dropped

I had to amend your script slightly

AllContacts:

LOAD * RESIDENT eComContacts;

CONCATENATE LOAD * RESIDENT EBSContacts;

DROP TABLE eComContacts;

DROP TABLE EBSContacts;

Anonymous
Not applicable
Author

Hi Alex,

.

There are various options:

1.  extract  data from both tables and concatenate and left join to contacts table.

2. or extract and store to QVDs and load QVDs  ,concatenate and do left join to contacts table

Not applicable
Author

Hi Ernesto,

i got your solution to work by adding NoConcatenate before the final table. thanks for your help!

NoConcatenate

AllContacts:

LOAD * RESIDENT eComContacts;

CONCATENATE LOAD * RESIDENT EBSContacts;

DROP TABLE eComContacts;

DROP TABLE EBSContacts;