Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
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.
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
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.