Example package that uses a third party library (Regex) to mask social security numbers.
We used the sdf generate
command with the sdf-package.yaml file to generate the project and then applied code changes to the following files:
Generate package binary:
sdf build
Test the code with:
sdf test
>> test function mask-ssn --value "My SSN is 534-34-3443."
My SSN is ***-**-****.
The following command will test the code with cargo
:
(cd rust/mask-ssn && cargo test)
After building the package, it is ready for use in dataflows: