bigfunctions > deidentify
deidentify¶
Signature
deidentify(text, info_types)
Description
Masks sensitive information of type info_types
in text
using Cloud Data Loss Prevention
Param | Possible values (can be one or any combination of the following values separated by comma) |
---|---|
info_types |
ADVERTISING_ID , AGE , AUTH_TOKEN , AWS_CREDENTIALS , AZURE_AUTH_TOKEN , BASIC_AUTH_HEADER , CREDIT_CARD_NUMBER , CREDIT_CARD_TRACK_NUMBER , DATE , DATE_OF_BIRTH , DOMAIN_NAME , EMAIL_ADDRESS , ENCRYPTION_KEY , ETHNIC_GROUP , FEMALE_NAME , FIRST_NAME , GCP_API_KEY , GCP_CREDENTIALS , GENDER , GENERIC_ID , HTTP_COOKIE , HTTP_COOKIE , IBAN_CODE , ICCID_NUMBER , ICD10_CODE , ICD9_CODE , IMEI_HARDWARE_ID , IMSI_ID , IP_ADDRESS , JSON_WEB_TOKEN , LAST_NAME , LOCATION , LOCATION_COORDINATES , MAC_ADDRESS , MAC_ADDRESS_LOCAL , MALE_NAME , MARITAL_STATUS , MEDICAL_RECORD_NUMBER , MEDICAL_TERM , OAUTH_CLIENT_SECRET , ORGANIZATION_NAME , PASSPORT , PASSWORD , PERSON_NAME , PHONE_NUMBER , SSL_CERTIFICATE , STORAGE_SIGNED_POLICY_DOCUMENT , STORAGE_SIGNED_URL , STREET_ADDRESS , SWIFT_CODE , TIME , URL , VAT_NUMBER , VEHICLE_IDENTIFICATION_NUMBER , WEAK_PASSWORD_HASH , XSRF_TOKEN |
Examples
1. String with email in it.
select bigfunctions.eu.deidentify("My email is shivam@google.co.in", "PHONE_NUMBER, EMAIL_ADDRESS")
select bigfunctions.us.deidentify("My email is shivam@google.co.in", "PHONE_NUMBER, EMAIL_ADDRESS")
select bigfunctions.europe_west1.deidentify("My email is shivam@google.co.in", "PHONE_NUMBER, EMAIL_ADDRESS")
+-----------------------------+
| masked_info |
+-----------------------------+
| My email is [EMAIL_ADDRESS] |
+-----------------------------+
2. String with phone number in it.
select bigfunctions.eu.deidentify("My phone number is 0123456789", "PHONE_NUMBER, email_address")
select bigfunctions.us.deidentify("My phone number is 0123456789", "PHONE_NUMBER, email_address")
select bigfunctions.europe_west1.deidentify("My phone number is 0123456789", "PHONE_NUMBER, email_address")
+-----------------------------------+
| masked_info |
+-----------------------------------+
| My phone number is [PHONE_NUMBER] |
+-----------------------------------+
3. If info_types
is null
or empty, all built-in info types may be used
select bigfunctions.eu.deidentify("My email is shivam@google.co.in", null)
select bigfunctions.us.deidentify("My email is shivam@google.co.in", null)
select bigfunctions.europe_west1.deidentify("My email is shivam@google.co.in", null)
+------------------------------------------+
| masked_info |
+------------------------------------------+
| My email is [PERSON_NAME][EMAIL_ADDRESS] |
+------------------------------------------+