To create the sequences for your TDM implementation, follow these steps:
The TDM library includes a TDMSeqList Actor that holds a list of sequences. Open this Actor and populate the table parameter with the relevant information for your TDM implementation as follows:
SEQUENCE_NAME — the sequence name must be identical to the DB sequence name if the next value is taken from the DB.
SEQUENCE_REDIS_OR_DB — indicates whether the next value is taken from Redis, memory, or from the target DB interface. Populate this setting using one of the following:
IN-MEMORY — this parameter is useful for testing only, as it can only be used in a single-node configuration.
DB interface name — this parameter can be populated with either the target DB interface (to get the next value from the DB sequence), or TDM (create a new DB sequence in the TDM DB). The DB interface name is supported for Oracle, DB2 and PostgreSQL DBs. Sequence Actors obtain the sequence name from the SEQUENCE_NAME column of tdmSeqList. If the sequence does not exits in the DB, the sequence Actor creates it.
Note: If the target DB does not have a sequence, or if it is neither Oracle, DB2 nor PostgreSQL, you can populate the Target DB interface name with TDM. The sequence will then be automatically created in the TDM DB.
INITIATE_VALUE_OR_FLOW — this parameter defines either an initial value for the sequence or the name of an inner flow (e.g., customerInitValue) to apply logic when retrieving the initial value. For example, the initial value can be set to the maximum value of the target table. The initial value is relevant only when the next value is retrieved IN-MEMORY or from a newly created DB sequence. Otherwise, the next value is taken from the existing DB sequence.
Notes:
Click here for more information about the sequence Actors.
An example of the TDMSeqList Actor's table parameter:
An example of an inner flow for retrieving the initial sequence value:
Update the Actor’s table parameter and then refresh the project by clicking the button (top of the Project tree). This action applies the changes in the TDMSeqList Actor and deploys the TDM LU.
The TDMSeqSrc2TrgMapping table maps between the generated sequence Actors and columns of the target tables. A sequence Actor can be mapped to multiple tables and LUs.
View the below example:
This table serves two purposes:
Adding the sequence Actors to the load flows. Populate the TDMSeqSrc2TrgMapping table to map between the generated sequence Actors and the columns of the target tables. A sequence Actor can be mapped to a different table and a different LU.
Adding the sequence Actors to the data generation flow that generates synthetic data for the LU table.
Click here for more information about implementing rule-based synthetic data generation.
By default, the generated sequence Actors and flows use the MaskingSequence Actor. Fabric enables creating your own function or Broadway flow in order to generate a new ID using either MaskingLuFunction or Masking Actors instead of the default MaskingSequence Actor.
Follow these steps for setting custom logic for a given sequence:
Click for more information about customizing the replace sequence logic.
To create the sequences for your TDM implementation, follow these steps:
The TDM library includes a TDMSeqList Actor that holds a list of sequences. Open this Actor and populate the table parameter with the relevant information for your TDM implementation as follows:
SEQUENCE_NAME — the sequence name must be identical to the DB sequence name if the next value is taken from the DB.
SEQUENCE_REDIS_OR_DB — indicates whether the next value is taken from Redis, memory, or from the target DB interface. Populate this setting using one of the following:
IN-MEMORY — this parameter is useful for testing only, as it can only be used in a single-node configuration.
DB interface name — this parameter can be populated with either the target DB interface (to get the next value from the DB sequence), or TDM (create a new DB sequence in the TDM DB). The DB interface name is supported for Oracle, DB2 and PostgreSQL DBs. Sequence Actors obtain the sequence name from the SEQUENCE_NAME column of tdmSeqList. If the sequence does not exits in the DB, the sequence Actor creates it.
Note: If the target DB does not have a sequence, or if it is neither Oracle, DB2 nor PostgreSQL, you can populate the Target DB interface name with TDM. The sequence will then be automatically created in the TDM DB.
INITIATE_VALUE_OR_FLOW — this parameter defines either an initial value for the sequence or the name of an inner flow (e.g., customerInitValue) to apply logic when retrieving the initial value. For example, the initial value can be set to the maximum value of the target table. The initial value is relevant only when the next value is retrieved IN-MEMORY or from a newly created DB sequence. Otherwise, the next value is taken from the existing DB sequence.
Notes:
Click here for more information about the sequence Actors.
An example of the TDMSeqList Actor's table parameter:
An example of an inner flow for retrieving the initial sequence value:
Update the Actor’s table parameter and then refresh the project by clicking the button (top of the Project tree). This action applies the changes in the TDMSeqList Actor and deploys the TDM LU.
The TDMSeqSrc2TrgMapping table maps between the generated sequence Actors and columns of the target tables. A sequence Actor can be mapped to multiple tables and LUs.
View the below example:
This table serves two purposes:
Adding the sequence Actors to the load flows. Populate the TDMSeqSrc2TrgMapping table to map between the generated sequence Actors and the columns of the target tables. A sequence Actor can be mapped to a different table and a different LU.
Adding the sequence Actors to the data generation flow that generates synthetic data for the LU table.
Click here for more information about implementing rule-based synthetic data generation.
By default, the generated sequence Actors and flows use the MaskingSequence Actor. Fabric enables creating your own function or Broadway flow in order to generate a new ID using either MaskingLuFunction or Masking Actors instead of the default MaskingSequence Actor.
Follow these steps for setting custom logic for a given sequence:
Click for more information about customizing the replace sequence logic.