Hello,
i have two tables (table A and table B), which I would like to join on the columns A.id = B.id.
The problem is: A.id is of the format varbinary and B.id is of the format varchar. Semantically the id is a hexadecimal number of length 32 (e.g.
00163F0F5BBC2345FA00230000120001).
Doing this using an inner join with SQL works fine (even without type conversion!).
select A.id, A.name, B.id, B.name
from A inner join B on A.id = B.id
Now I try to do this using HANA Analytical/Calculation/Attribute Views, but I dont know how. Here is what i tried and the reasons it doesnt work:
Using Attribute Views:
Joining the tables directly returns 0 rows.
I created a calculated column for the table B called id_conv, which is of type varbinary and the code is just "id".
Attribute views do not allow to join on calculated columns, so this doesnt help.
Next I created an attribute view called B_conv, which has the calculated column id_conv.
To reuse attribute views, I created an analytical view. Unfortunately analytical views do not allow to join tables on calculated columns.
Finally I tried to join these two tables using a calculation view. This requires a measure, which is not required/desired. Can I create a dummy measure (like always returning 0) to avoid this restriction?
TLDR: What is the best practice to join two tables on a calculated column using the graphical views in HANA studio?