Catégories :

Fonctions de chaîne et fonctions binaires (Fonctions AI)

AI_REDACT

Rédige des informations d’identification personnelle (PII) à partir de données textuelles non structurées.

Syntaxe

AI_REDACT( <input> [,  <categories> ] [, <return_error_details> ] )
Copy

Arguments

Obligatoire :

input

Une valeur VARCHAR contenant des données de texte pouvant contenir des informations d’identification personnelle (PII).

Facultatif :

categories

Un ARRAY de valeurs de chaînes qui spécifient les types de PII à rédiger. Si non spécifié, toutes les catégories PII prises en charge sont rédigées. Voir Catégories de PII détectées pour une liste des catégories prises en charge.

Passing an unsupported category results in an error.

return_error_details

A BOOLEAN flag that indicates whether to return error details in case of error. When set to TRUE, the function returns an OBJECT that contains the value and the error message, one of which is NULL depending on whether the function succeeded or failed.

Requires that the session parameter AI_SQL_ERROR_HANDLING_USE_FAIL_ON_ERROR to be set to FALSE.

Renvoie

Generally, a VARCHAR containing placeholder values in place of redacted PII, such as [NAME] where the input text had « John Smith ».

If the session parameter AI_SQL_ERROR_HANDLING_USE_FAIL_ON_ERROR is set to FALSE and the optional argument return_error_details is set to FALSE or is not passed, and the function cannot process the input, the function returns NULL.

If the session parameter AI_SQL_ERROR_HANDLING_USE_FAIL_ON_ERROR is set to FALSE and the optional argument return_error_details is set to TRUE, the function returns an OBJECT with the following fields:

  • value: A VARCHAR value that contains the redacted text, or NULL if an error occurred.

  • error: A VARCHAR value that contains the error message if an error occurred, or NULL if the function succeeded.

Notes sur l’utilisation

Exemples

Voir Exemples.