Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
leon511920
Contributor III
Contributor III

Load Script

Hi,

As shown in the attached diagram, I would like to take the max value from the one table and perform a calculation.
But the load script does not move from the highlighted part and stops. I don't know the cause.Does anyone know the solution?


(Because of the circular reference, I got  warning. So they are not related.)

aa.png

4 Replies
henrikalmen
Specialist
Specialist

Your join clause is not actually doing anything. When joining you need a key field that exists in both tables, and then the additional fields will be added to the table. In your case it seems you want to add fields from Customer to the table Temp1, but you haven't specified any fields in the customer table. Did you mean to write "left join(Temp1) load customer_id, * Resident Customer;"? But in that case, you would have had to have the field customer_id already present in the table Temp1 (perhaps id in Table1 is customer_id in the customer table, if so you need to assign the same names to them).

leon511920
Contributor III
Contributor III
Author

Thank you so much.

As you say, [id] and [cutomer_id] indicate the same thing, and I want to associate them, but when I try to associate them in Data Manager, I got an error that they are circular. Is there any solution?

leon511920
Contributor III
Contributor III
Author

How can I make multiple items related to other tables when viewed in the model viewer?

henrikalmen
Specialist
Specialist

When loading Temp1 you could do "load id as customer_id ..." to rename the id field, or when loading from the Customer table you could do "load customer_id as id ..." so that the fields are assigned the same names. Qlik creates links between tables using field names, and you can only have one such link between tables. There must be only one field that links two tables together, not two fields.

But still, a join with only one field does not do anything. When joining from the customer table, you need to specify what fields from the customer table should be added to the Temp1 table. What is it that you want to achieve with the join you have a problem with in your example?

 

How can I make multiple items related to other tables when viewed in the model viewer?


This is a completely different question, but if the link between two (original) tables consists of more than one field, you need to create one unique key field  - a composite key - to avoid synthetic keys. One way to do that could be something like load product&'#'&catgory as %productCategoryKey in tables that need this link, and only in one of those table load the specific fields product and category respectively