❖ SelfReferentialHierarchy
Last updated
Last updated
Use the SelfReferentialHierarchy CAG Pattern when you have a column in the table that references the primary key column of the same table (aka a self-reference); and the self-references are not allowed to have any cycles.
This functionality is in Beta. At this time, select SDV Enterprise users have been invited to use this feature.
Create a SelfReferentialHierarchy
pattern object
Parameters:
(required) table_name
: A string with the name of the table that contains the self-reference
(required) primary_key
: A string with the name of the primary key column in the table
(required) foreign_key
: A string with the name of the foreign key column in the same table that references the primary key
scaling_method
: A string with the name of the method, used when scaling up the synthetic data
(default) 'branch'
: Keep the original depth of the hierarchy but add more branches to it. In our example above, this would add more reports for a given manager.
'depth'
: Add to the depth of the self-references. In our example above, this would create new levels of managers, increasing the length of the reporting chain to the CEO.
Make sure that all the table and columns in you provide are in your Metadata, and have a primary key associated with them. Note that you cannot supply a self-reference relationship in the metadata right now, so the relationships
section of your Metadata can be blank.
Apply the pattern to any SDV synthesizer. Then fit and sample as usual.