In the previous chapter, we've talked about technical consistency. Luckily in that case we don't have to worry, because DATPROF Subset will take care of it. The idea behind subsetting is to only extract the direct or indirect related data of the start table. There can be situations in which this is conflicting. Depended on your requirements there can be cases in which you want to define functional consistency checks, to make sure that your subset is not only technical consistent, but also functional consistent.
Let's explain this with the following example:
The following source database has been subsetted in the target database.
In the above example the PRICE in the CONTRACT_DETAILS is combined the TOTAL_VALUE in the CONTRACTS table. If we have the following subset in the target database, it is still technical consist. There aren't any CONTRACTS missing. We don't have any foreign key violation! However from a functional consistency point of view we are missing CONTRACT_DETAILS that belong to the contract.
In most cases DATPROF Subset will take care of this as well, but some complex data models may cause initial functional inconsistencies. This can easily be prevented within your template! Each Foreign Key can be checked for functional consistency. This means that after the initial subset run DATPROF Subset will always check if all the child records are subsetted of the subsetted parent records. This check will only be for the foreign keys that have the functional consistency check on!
- Right click CONTRACT_DETAILS and click Properties... from the context menu
- Go to the Foreign Key tab
- Double click the checkbox Functional Consistent for the foreign key
Great! Now DATPROF Subset will make sure that all CONTRACT_DETAILS records are selected for each CONTRACT.
The following video will show you how to apply the functional consistency check on a foreign key.