Configuring masking conditioned by data from related entities involves retrieving relevant data from the related entity, defining the relationship between the table being masked and the related entity, and the conditions for masking.
Retrieving relevant data from the related entity and defining the relationship between the table being masked and the related entity is done within the Handling strategy within the table masking activity.
Masking conditions are defined by conditional masking.
The related table does not need to be imported into the Portal using the "Create data source / create environment" functionality and into Designer using the "Import Portal Data" functionality. The same connection string is used for the table being masked and for the related table.
First names and last names in the Customer table should be masked according to the cities stored in the Address table. IT only affects customers from that city
Customers that are from a city Blackstone
should be masked only.
Ekobit.BizDataX.Databases.MSSQL
NuGet package is installedDatasources.Demo_data_source.dbo.Customer.Handle.WithBulk()
.Datasources.Demo_data_source.dbo.Customer.Handle.WithReader().Join("Select City,CustomerID from dbo.Address","{table}.CustomerID={related}.CustomerID").WithBulk()
Select City,CustomerID from dbo.Address
is select statement used to retreive related data, and{table}.CustomerID={related}.CustomerID
is join criteria.X=>X.RelatedSingle().AsStringOrDefault("City")=="Blackstone"
which means that only customers from a city Blackstone
should be affected by masking. More details about conditional masking can be found at Condition page.
Figure 1: Complete example workflow
BizDataX Documentation © Built by Ekobit. All rights reserved.
https://www.ekobit.com/ https://bizdatax.com/ https://bizdatax.com/support/