Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We don’t have a primary key defined for some tables in the Oracle database. How should we handle these tables in Qlik Compose? Some of these tables contain NULL values in all columns, so we are unable to define a primary key. In this case, should we consider all columns together as a composite primary key?
How to resolve this issue?
If all columns contain NULL on some rows, those rows would not be able to have a composite key using all columns as the key itself would become null. But why would you want to load those completely empty rows at all?
You could create a composite key using all columns (unless all are null) but you would need to know that no two rows contain the exakt same values, unless you make sure you load only unique rows.
We have values in all columns, but NULL values are also coming from the source. In this case, I cannot select one or two columns as the primary key. Therefore, I would need to consider all columns together as a composite primary key. However, since NULL values are present in all columns, could you please advise how we should handle this in Qlik Compose?
This table does not have a primary key defined in the source database.
How are you going to use this table’s data? If you know that, you should be able to figure out what your key needs to be.
A key based on all columns is kind of not a key, is it? Will it be usable?
I actually don’t know how Qlik Compose works, but I know how QlikView and Qlik Sense handles keys between tables. There you could use for example hash256(col1name, col2name …) to create a key, or do something like coalesce(col1name,’’)&’#’coalesce(col2name,’’)&’#’&… to make sure all columns are dealt with.