I have 2 source files containing different fields and I have created a table with CONCATENATE
"Account Name", "Platform Name",
"Ad Name", "Budget",
THIS IS THE FIRST SOURCE FILE
"Campaign Name", "Advert set name" "Ad Name",
THIS IS THE SECOND SOURCE FILE
I have to link this table to another table, named Table2 (THIRD SOURCE FILE)
What I want to do is to create a Link Table so I want to reload Table1 and create a key field for the Link Table, by taking 1 parameter (Account Name) from the first source file and one parameter (Campaign Name) from the second source file and doing something like this.
"Account Name"&'|'&"Campaign Name" as [%key field]
The reason is that in the THIRD SOURCE FILE, I have the same 2 parameters and that's why I wanted to create a link table
Is it possible to do it? If not, can you suggest me another workaround so I can work on it?
Hi Paolo, as a workaround, you can avoid the concatenation in Table1, as none of the rows will have a value in both fields (The rows with value in "Account Name" will have a Null() in "Campaign Name" and vice versa)
Your link table can be loaded with the key field and with both fields 'alone' so each one links to one of the other tables (Accounts and Campaigns), this will return the linked data between an Account and their campaigns avoiding duplicated 'budget'.
LOAD "Account Name"&'|'&"Campaign Name" as [%key field], // Not really needed?
It depends on your complete data model if this can be an option.
Thanks for your reply. The thing is that I need to do the concatenation since the two tables (which are actually 5 tables) have already 1 field in common (I didn't write it since I wanted to present a simplified version of the problem)
so what I want to do is to reload my big table (Table 1, which is the concatenation of 5 source files), and create a synthetic key with these 2 fields coming from 2 different source files
I just wrote something like
"Account Name"&'|'&"Campaign Name" as [%key field],
//FROM ...(I didn't write from... since the fields I want to load refers to different source files)