Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Greg_Pagan
Contributor III
Contributor III

Mulitple Column Key creation

We are currently using Replicate 5/2024 with Oracle Exadata as the source and Snowflake as the target.  We have multiple Oracles tables that come in with no key column(s) identified.  In some of them the only way to create a key is to use multiple columns to get key that would be not null.  Currently we do that using an expression to create a hash key which is made up of multiple columns to insure that at least one of the columns will have a value so that the has does not come out null.   We are wondering if we could do that using the Key column only with out having to create the hash value.  Any idea's?

Labels (1)
2 Solutions

Accepted Solutions
Dana_Baldwin
Support
Support

Hi @Greg_Pagan 

Yes, you can use the key column to specify which columns should be treated as PK on the target. Of course, Snowflake does not enforce uniqueness based on the PK, but that does not appear to be your concern.

Changing this in task settings will prompt you to reload the task. If your task settings are to drop and recreate the target tables on reload, which is the default, then the new target tables will be created with the PK definition you specified.

Thanks,

Dana

View solution in original post

Greg_Pagan
Contributor III
Contributor III
Author

Thanks for the information Dana.  I tested the use of multiple columns to make up the key and just like you said, it uses all three in what ever order I select using the button that pops up when you select the first column.  I think this will be easier than creating an expression in a new column to hold a hashed key that we create using the hash_sha256 function.  

View solution in original post

2 Replies
Dana_Baldwin
Support
Support

Hi @Greg_Pagan 

Yes, you can use the key column to specify which columns should be treated as PK on the target. Of course, Snowflake does not enforce uniqueness based on the PK, but that does not appear to be your concern.

Changing this in task settings will prompt you to reload the task. If your task settings are to drop and recreate the target tables on reload, which is the default, then the new target tables will be created with the PK definition you specified.

Thanks,

Dana

Greg_Pagan
Contributor III
Contributor III
Author

Thanks for the information Dana.  I tested the use of multiple columns to make up the key and just like you said, it uses all three in what ever order I select using the button that pops up when you select the first column.  I think this will be easier than creating an expression in a new column to hold a hashed key that we create using the hash_sha256 function.