Qlik Community

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

cancel
Showing results for 
Search instead for 
Did you mean: 
ivanseric
Contributor II
Contributor II

Creating key between tables not possible because of "name '' already exists." error during rename

I have two tables. Let's call them table_animal (from PostgresSQL DB) and table_zoo (from Salesforce). I have two separate load scripts for them. 

table_animal contains a field called "zoo" which I would like to use as a key

table_zoo contains a field named "zoo_name" which I would like to use as a key

As far as I have understood, I need to name them the same so that Qliksense recognized them as a key. 

At the end of the load script for table_zoo I entered a "rename field" statement to rename "zoo_name" to "zoo"

When the load scripts run, I get an error "The name 'zoo' already exists." 

 

Can someone tell me how I could still create  a key between does two tables or make the renaming work?

Labels (2)
1 Solution

Accepted Solutions
Tanalex
Creator II
Creator II

You might try renaming the field in the load.

LOAD

zoo_name AS zoo,

...

 

Also, are the tables of a similar structures? It may be concatenating them.  Try NOCONCATENATE between the two LOAD scripts.  

If you include example data, that would help us assist.

View solution in original post

3 Replies
Tanalex
Creator II
Creator II

You might try renaming the field in the load.

LOAD

zoo_name AS zoo,

...

 

Also, are the tables of a similar structures? It may be concatenating them.  Try NOCONCATENATE between the two LOAD scripts.  

If you include example data, that would help us assist.

ivanseric
Contributor II
Contributor II
Author

I tried that but then I get the following error 

"Field [zoo_name] as [zoo] not found in the object Account*. "

I also tried this without the brackets and with '' and "" but I always get the same error. In my load scripts from SQL databases setting an alias always works. I am only encountering this issue with the Salesforce connection.

 

* Account is the table that I am trying to load from Salesforce.

ivanseric
Contributor II
Contributor II
Author

Creating an alias anyway worked. When I reported this issue, I used the automatically generated load scripts from Qliksense which had first the LOAD statement and then the SELECT statement in it. I just switched the order of the two and then the alias worked.