Broadway enables generating and setting new sequences before loading data into a target database. Various sequence patterns can be implemented via the MaskingSequence Actor and other Broadway features.
This article describes the most useful use cases of sequence implementation by Broadway.
A common scenario of sequence implementation is when the same sequence needs to be used per entity across several flows during the same execution. The following use cases of sequence caching are supported:
To implement the above use cases, set a unique maskingId and populate it on the MaskingSequence Actor everywhere the same sequence is used. Keep the useEnvironment as true and the useExecutionID as true in each Actor's settings to generate a new masked value in each execution in the same environment or set it to false to use the same masked value across different executions and environments.
The sequence next value implementation method depends on the sequence definition set by the sequenceInterface input argument. The following use cases are supported:
Sequence initiation can be performed using the initialValue and the increment settings of the Actor and is relevant for in-memory or Redis interface only. In a DB sequence these attributes are managed by the DB. Note that the initial value is cached on the Actor's first execution. The following use cases are supported:
In Broadway sequences can be mapped in a number of ways. The following use cases are supported:
Map the old value to the new value.
When there is no old value to be mapped to the new value and the target table requires a sequence, leave the input value empty. The Actor generates a new sequence and returns it in its output. This feature is applicable as of Release 6.4.1.
Set the sequence as part of the attributes list. An example of the attributes list can be a string which concatenates several pairs of keys and values including the sequence as one of them. To do so, generate the sequence and then create the concatenated attributes list using the JavaScript Actor.
Set the sequence in a specific format, for example SQ|date(Ym)|BR[value]|[new_seq]. To do so, generate the sequence and then use the MaskingLuFunction Actor to mask the input value with the result of the LU function's execution. Selection of the LU and the function are implemented by the MaskingLuFunction Actor in the same way as by the LuFunction Actor.
Set the sequence value based on a condition, for example generate the sequence value only for some entries based on a given condition. To do so, define a Stage Condition in the Broadway flow.
Replace the IID with a new sequence. This use case is the same as mapping the old value to the new one.
When parent-child relationships exist across Logical Units, the same sequence can exist in both the parent and children. The updated flow can be executed on the parent LU to add a child sequence. For example, the Customer LU is a parent while the Order LU is a child. After the population of both the Customer and Order LUs is completed, update the Customer LU with the sequence from the Order LU.
Store the relationship between the old and the new sequence. To do so, create a flow that stores these values in the Cassandra TDM_SEQ_MAPPING table under the k2masking keyspace, for example for reporting purposes.
Clone the entities when required. Different sequence values are generated for each cloned entity. This functionality is supported as part of the TDM7 implementation.
Broadway enables generating and setting new sequences before loading data into a target database. Various sequence patterns can be implemented via the MaskingSequence Actor and other Broadway features.
This article describes the most useful use cases of sequence implementation by Broadway.
A common scenario of sequence implementation is when the same sequence needs to be used per entity across several flows during the same execution. The following use cases of sequence caching are supported:
To implement the above use cases, set a unique maskingId and populate it on the MaskingSequence Actor everywhere the same sequence is used. Keep the useEnvironment as true and the useExecutionID as true in each Actor's settings to generate a new masked value in each execution in the same environment or set it to false to use the same masked value across different executions and environments.
The sequence next value implementation method depends on the sequence definition set by the sequenceInterface input argument. The following use cases are supported:
Sequence initiation can be performed using the initialValue and the increment settings of the Actor and is relevant for in-memory or Redis interface only. In a DB sequence these attributes are managed by the DB. Note that the initial value is cached on the Actor's first execution. The following use cases are supported:
In Broadway sequences can be mapped in a number of ways. The following use cases are supported:
Map the old value to the new value.
When there is no old value to be mapped to the new value and the target table requires a sequence, leave the input value empty. The Actor generates a new sequence and returns it in its output. This feature is applicable as of Release 6.4.1.
Set the sequence as part of the attributes list. An example of the attributes list can be a string which concatenates several pairs of keys and values including the sequence as one of them. To do so, generate the sequence and then create the concatenated attributes list using the JavaScript Actor.
Set the sequence in a specific format, for example SQ|date(Ym)|BR[value]|[new_seq]. To do so, generate the sequence and then use the MaskingLuFunction Actor to mask the input value with the result of the LU function's execution. Selection of the LU and the function are implemented by the MaskingLuFunction Actor in the same way as by the LuFunction Actor.
Set the sequence value based on a condition, for example generate the sequence value only for some entries based on a given condition. To do so, define a Stage Condition in the Broadway flow.
Replace the IID with a new sequence. This use case is the same as mapping the old value to the new one.
When parent-child relationships exist across Logical Units, the same sequence can exist in both the parent and children. The updated flow can be executed on the parent LU to add a child sequence. For example, the Customer LU is a parent while the Order LU is a child. After the population of both the Customer and Order LUs is completed, update the Customer LU with the sequence from the Order LU.
Store the relationship between the old and the new sequence. To do so, create a flow that stores these values in the Cassandra TDM_SEQ_MAPPING table under the k2masking keyspace, for example for reporting purposes.
Clone the entities when required. Different sequence values are generated for each cloned entity. This functionality is supported as part of the TDM7 implementation.