Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

want to avoid synthetic key

I have a document where I load several columns from a csv file and then I create another table with two columns from table 1, like this:

Table1:                    Table2:

column1                   column1

column2                   column2

column3                   Resident Table1;

column4

column5

from myfile.csv;

I only want column1 as key, how can I solve this? I can't rename any of the columns

1 Solution

Accepted Solutions
Colin-Albert

Rename column2 in  table2 in the load script.

Table1:                    Table2:

column1                   column1

column2                   column2 as column 6

column3                   Resident Table1;

column4

column5

from myfile.csv;

The question is why do you need this second table as all the data in Table2 exists in Table1 or is there more of the script that is missing?

View solution in original post

4 Replies
Colin-Albert

Rename column2 in  table2 in the load script.

Table1:                    Table2:

column1                   column1

column2                   column2 as column 6

column3                   Resident Table1;

column4

column5

from myfile.csv;

The question is why do you need this second table as all the data in Table2 exists in Table1 or is there more of the script that is missing?

Not applicable
Author

The linked field between two tables must be only one!

Create a third linked table after Table 1 with:

LinkedTable:

Laod

autonumber(Column1,Column2) as Key,

Column1,

Column2

Resident Table1;


Table 2:

Laod

autonumber(Column1,Column2) as Key,

drop fields Column1,Column2 from Table1;

MayilVahanan

Hi

For resident table, you can simply rename the second field name.

or

Qualify *;

unqlualify column1;

load column1, column2 resident table1;

in this case, refer rename field name itself

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

You can  rename of column2 in either one of the tables

like this

column2 as column20