Skip to main content
Skip table of contents

Advanced Confidentiality Rule Options

By default, the confidentiality rule will apply to all tables created from any dataset that the method has been applied to in SuperADMIN. From release 9.6 onwards, some additional configuration options have been added. For example, you can now configure the confidentiality rule so that it only applies when specific fields are in the table.

This section describes these additional options:

Apply the Confidentiality Rule only when Specific Fields are in the Table

The confidentiality rule module now supports a FIELDS property, which takes a list of field codes or labels (separated by semi-colons). When this property is set, the confidentiality rule will only apply if at least one of the specified fields is in the table.

For example, the following method will only apply when the Gender or Marital Status fields appear in a table:

CODE
method addmethod conditionalconfid mandatory "Conceal values 10 or less when Gender or Marital Status in table"
method conditionalconfid adddcplugin confrule confidentialityrule
method conditionalconfid confrule addproperty RULESET "THRESHOLD(10)"
method conditionalconfid confrule addproperty FIELDS "Marital Status;Gender"

Once you have defined the method, you can apply it to a dataset in the usual way. For example:

CODE
cat bank addmethod conditionalconfid

Age by Gender, values 10 and under are concealed:

Age by Area, values 10 and under are not concealed:

Notes and Examples for Specifying Fields

Specifying the fact table

You can optionally specify the fact table that a field belongs to (for example because you have a field with the same label in multiple fact tables but you only want the rule to apply to one of those fields).

Specify the code or label of the fact table, followed by a colon, and then the code or label of the field.

For example, the following setting applies confidentiality to the Marital Status field in the Customers table and the Product Type field in the Accounts table. It also applies to any instances of a field called Gender, regardless of which fact table it appears in:

CODE
method conditionalconfid confrule addproperty FIELDS "Customers:Marital Status;Accounts:Product Type;Gender"
Using codes instead of labels

The FIELDS property accepts both field labels and codes. Using codes, the above example could be rewritten as:

CODE
method conditionalconfid confrule addproperty FIELDS "F_Customer:Marital_Status;F_Account:Product_Type;Gender"

You can obtain the field and fact tables codes from SuperADMIN by using the following command:

CODE
cat <dataset_id> <field>

For example, to obtain the code for Marital Status in the sample Retail Banking dataset (id: bank):

CODE
> cat bank "Marital Status"
[ XTAB Field : 'Marital Status' ]
    [ ID : 'SXV4__Retail_Banking__F_Customer__Marital_Status_FLD' ]
    [ Value Set : 'SXV4__Retail_Banking__C_Marital_Status' ]

The codes are returned in the field ID, which takes the following format: SXV4__<dataset>__<fact_table_code>__<field_code>_FLD. In the example shown here, the fact table code is F_Customer and the field code is Marital_Status

If you choose to specify the fact table as well as the field (such as F_Customer:Marital_Status), then you must use either the codes for both the fact table and field, or the labels for both. You cannot use a combination of the two, such as a fact table code followed by a field label.

Multilingual datasetsIf you have a multilingual dataset, then you can still use either labels or codes to specify your list of fields. If specifying labels, you must use the label from the original language used when the SXV4 was channelled.
Specify fields only, not summation optionsThe FIELDS property only applies to classification fields from the SXV4 dataset. It does not apply to summation options or measures defined in the original SXV4 dataset.
User Defined Fields

The confidentiality rule also applies if there are any User Defined Fields (UDFs) in the table that are derived from one of the fields specified in the FIELDS property.

This includes:

  • Summation UDFs (in this case, the confidentiality rule will apply to the entire table, even if there are other summation options used in the table that are not derived from a specified field).
  • Classification UDFs.
  • UDFs where the specified field is used as a filter even if it is not the main field being transformed (for example in multiple level UDFs and quantiles).
The above applies recursively, so that a UDF based on a UDF that is based on one of the specified fields will also count for the purposes of determining whether to apply the confidentiality rule.

Set Different Thresholds for Totals and Non Totals

It is now possible to set a different threshold value depending on whether the cell is a total or a regular table cell. The THRESHOLD property now takes an optional second parameter that can be set to TOTALS or NONTOTALS to indicate which cells the threshold applies to. When setting both thresholds, specify two THRESHOLD properties, separated by the | character.

For example, the following method applies a threshold of 5 to non totals and 10 to total cells:

CODE
method addmethod differenttotals mandatory "Conceal values of 5 or less in regular cells and 10 or less in totals"
method differenttotals adddcplugin confrule confidentialityrule
method differenttotals confrule addproperty RULESET "THRESHOLD(5,NONTOTALS)|THRESHOLD(10,TOTALS)"

Once you have defined the method, you can apply it to a dataset in the usual way. For example:

CODE
cat bank addmethod differenttotals

The example table shown here has no threshold rule applied to it.

With the above threshold rules, the low value cells are concealed. In the highlighted cells, values of 6 and 8 in regular table cells have not been concealed (as they are above 5). However, a value of 8 has been concealed in the total column.

Set Different Frequency Rules for Totals and Non Totals

It is also possible to set a different frequency rule for totals and non totals. The FREQ rule now takes an optional additional parameter that can be set to TOTALS or NONTOTALS. When setting both frequency rules, specify two FREQ properties, separated by the | character.

For example, the following method applies a frequency rule of 3 to non totals and 5 to total cells:

CODE
method addmethod differentfreqs mandatory "Conceal regular cells with 5 contributors or fewer and conceal totals with 10 contributors or fewer"
method differentfreqs adddcplugin confrule confidentialityrule
method differentfreqs confrule addproperty RULESET "FREQ(3,,NONTOTALS)|FREQ(5,,TOTALS)"

The double comma is required, as the TOTALS / NONTOTALS parameter is the third parameter accepted by the FREQ property (the second parameter is only used in cases where you want to specify a different cube when determining whether to conceal the results; see Record Count - Data Control for more details on this setting).

Once you have defined the method, you can apply it to a dataset in the usual way. For example:

CODE
cat bank addmethod differentfreqs
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.