IBM Support

How to mask the first N-characters of each element in a column in SPSS Modeler?

How To


Summary

For data manipulation or security reasons, a certain number of characters in the data imported into SPSS Modeler may need to be changed or masked.

Steps

In order to mask or replace the first n characters, the following syntax in Derive node is an option.
replace(startstring(N, STRING),NEWSUBSTRING,STRING)
See this example to mask the first 4 characters with "****" in Text column:
Text replacement
In this example, the first four characters in the Text column are replaced with four asterisks with the following syntax:
replace(startstring(4, Text),'****',Text)

Additional Information

For more information about string functions of SPSS Modeler, see Modeler User Guide, CLEM Language Reference section: IBM SPSS Modeler 18.5 User's Guide.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS3RA7","label":"IBM SPSS Modeler"},"ARM Category":[{"code":"a8m3p0000006xr6AAA","label":"SPSS Modeler"}],"ARM Case Number":"TS016046116","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
11 June 2024

UID

ibm17157206