❖ CompositeKey
Last updated
Last updated
Use the CompositeKey CAG Pattern when multiple columns together form a primary key. Optionally, you may also have multi-column foreign key that connects to the primary key.
Create a CompositeKey
pattern object.
Parameters:
(required) table_name
: A string with the name of the table that has the composite key
(required) primary_key
: A list of strings representing all the columns in the table that form the composite, primary key
child_tables
: A list of dictionaries that represent all the children of this table. Within each dictionary provide 'table_name'
(the name of the child table) and 'foreign_key'
(a list of columns that form the composite foreign key).
(default) None
: The table does not have any children.
Make sure that all the table and columns in you provide are in your Metadata. If you provide any foreign key connections, make sure they align with the columns in the primary key.
Apply the pattern to any SDV synthesizer. Then fit and sample as usual.
❖ SDV Enterprise bundle. This feature is available for purchase as an SDV Enterprise bundle. For more information, visit our page to .