I have a legacy database without primary keys. I know how to evaluate a single column for uniqueness, and thus a primary key. How do I evaluate multiple columns which together would be unique and thus be a composite primary key?
Hi
In our ONE Desktop application (IDE), we have a tutorials for this scenario. Of needing to check many different combination of columns to determine which combination represents a unique composite primary key.
In your file explorer pane on the left hand side, look for a project named ‘tutorials’, if this does not exist you can add this project by
Right Clicking on the ‘DQ Projects’ node in the ‘File Explorer’ pane.
Select New, then Project.
In the dialog box that appears select Tutorials projects and select the option for ‘Tutorials’.
The project will then be created in your workspace.
Open the Tutorials project node, and navigate to the folder ‘07 Analyze’.
In this folder you should find some plans
07.02 Profiling simple.plan and 07.03 Profiling advanced.plan
Open the 07.03. Profiling advanced.plan and double left click on the blue Profiling step.
In the dialog box that appears, select the input data pipeline on the left most side. Here the tutorial has just one input.
Then after selecting the input the tabs on the right hand side of the dialog box will change.
Select the Primary Keys tab.
Add new PK analyses by click the add button on the right and adding the columns which you which to test in each PK combination.
You can give a meaningful name to each analyses to help keep track of each. (col1+col2 for example)
Finally once you have configured all the combinations you wish to test, click apply then OK.
Save the plan and run it.
After the plan has run, hold down CTRL and left double click on the blue profiling step, or locate the .profile file in the file explorer and double left click to open form there.
In the dialog box that appears click on the Primary Keys tab. Here we can see the different PK combinations we configured and observe the statistical analysis to determine if any of the combinations represents a unique composite PK.
In our Tutorial data, none of the column combinations was able to make a unique comp PK. (2 non-unique and 20 non-unique).
I hope this helps, and good luck determining your PK for your legacy db. Let us know how you get on.
Danny
Reply
Login to the Ataccama Community
No account yet? Create an account
For Ataccama Customers and Partners
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.