Generators that are applied to primary key columns are different from other generators in the following ways:
The generated data must be unique in order to not break constraints
The generators are consistent (same input → same output), so that when this generator is applied to a primary key column and its linked foreign key columns, no links are broken.
This is accomplished using format preserving encryption.
For more information on this, and details on how to provide your own encryption key, contact support@tonic.ai.
You apply a primary key generator in the same way as you do any other generator.
Tonic Structural then automatically applies the same generator to all foreign key columns that reference the primary key.
Foreign keys are either defined by the source schema or added from the Foreign Key Relationships page. For more information, go to Viewing and adding foreign keys.
Structural currently supports the following generators for primary key columns:
ASCII Key The ASCII Key generator does not preserve the format of the input value. It uses the ASCII alphabet for input and the alphanumeric alphabet for output. This leads to output values that are longer than the input values.
If you need support for additional types, contact support@tonic.ai.
Primary key generators are not supported in the Scale table mode. The process requires control over the key columns to make sure that all of the relationships are maintained.
You also cannot assign a primary key generator on a table that is related to a Scale mode table through a foreign key.