Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am having tables stu_details and dep_details,,,
stu_details contain columns id_no,name,dep_no,department
dep_details contain columns dep_no,department
when i see the table viewer one extra table shown with name $Syn1 Tabel with column fields $Syn,dep_no,department
Pls,,,,can any one explain why the unknown table created ($Syn1 Tabel)
Thanks in advance
Its created because you have more than one similar feild in ur data. try renaming dep_no or department in both tables to either %_departmentKey or %_dep_noKey.
Is it enough to change in only one table..ie changed the stu_details table 'department 'to 'dep'
How will the mappings happen if fieldnames differ in both tables?(no one matching fields in tables)
That will work but i personally wouldnt. U can also try doing a LEFT JOIN if there isnt to much information to create one single table.
Hi btechrames ,
When two or more input tables have two or more fields in common, this implies a composite key relationship. QlikView handles this through synthetic keys. These keys are anonymous fields that represent all occurring combinations of the composite key...
synthetic keys are formed in tables that share more than one field. Synthetic tables are used to link them.
Keep the linking field names same...
Regards
If you WANT the two tables to be connected by two fields, then I agree with nilupaboralessa - "Keep the linking field names same".
When you have the table viewer up, look up at the top of the screen. There's a drop down with value "Internal Table View" in it. When you see the $syn, that's a "synthetic key", which is something QlikView builds for you internally. Think of it as QlikView normalizing your data for you, if you wish. If you don't like how that looks, you can also select "Source Table View" from the drop down. You should then see no synthetic key, and just your two fields connected together. Both are equivalent. It's just two different ways of QlikView showing you that your table is connected by TWO fields instead of by one.
As long as you INTENDED for your tables to be connected by two fields, then there's nothing wrong.
BUT... most often, particularly with new developers and/or people unfamiliar with data modeling, synthetic keys will typically result from data model problems, from unintended connections in the data. So think of them as a warning. When you see them appear, just make certain that you intended those tables to connect together that way, and if not, fix the data model.
In this case, I can see no reason for the stu_details to contain the department field, unless you can have more than one department for a given dep_no. But I'm guessing that dep_no is a code for the department. Alternatively, there may be no reason to load the dep_details table at all. Is it really providing any additional information?
Agree.
I have to admit that time ago I was told that synth keys were due to some problems in my data model. Time, and sometimes, unexpected attempts showed me that syn keys are really useful, and actually save some scripting time.
Anyway, for a better, real-life understanding of this feature of QlikView, it's worth reading this post regarding syn tables. I was useful, at least for me.
Regards.