Skip to main content

PiiDetection

Struct PiiDetection 

Source
#[non_exhaustive]
pub struct PiiDetection {
Show 15 fields pub name: String, pub inputs: Vec<String>, pub pii_type: PiiType, pub entity_types_to_detect: Vec<String>, pub output_column_name: Option<String>, pub sample_fraction: Option<f64>, pub threshold_fraction: Option<f64>, pub mask_value: Option<String>, pub redact_text: Option<String>, pub redact_char: Option<String>, pub match_pattern: Option<String>, pub num_left_chars_to_exclude: Option<i32>, pub num_right_chars_to_exclude: Option<i32>, pub detection_parameters: Option<String>, pub detection_sensitivity: Option<String>,
}
Expand description

Specifies a transform that identifies, removes or masks PII data.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

The name of the transform node.

§inputs: Vec<String>

The node ID inputs to the transform.

§pii_type: PiiType

Indicates the type of PIIDetection transform.

§entity_types_to_detect: Vec<String>

Indicates the types of entities the PIIDetection transform will identify as PII data.

PII type entities include: PERSON_NAME, DATE, USA_SNN, EMAIL, USA_ITIN, USA_PASSPORT_NUMBER, PHONE_NUMBER, BANK_ACCOUNT, IP_ADDRESS, MAC_ADDRESS, USA_CPT_CODE, USA_HCPCS_CODE, USA_NATIONAL_DRUG_CODE, USA_MEDICARE_BENEFICIARY_IDENTIFIER, USA_HEALTH_INSURANCE_CLAIM_NUMBER,CREDIT_CARD,USA_NATIONAL_PROVIDER_IDENTIFIER,USA_DEA_NUMBER,USA_DRIVING_LICENSE

§output_column_name: Option<String>

Indicates the output column name that will contain any entity type detected in that row.

§sample_fraction: Option<f64>

Indicates the fraction of the data to sample when scanning for PII entities.

§threshold_fraction: Option<f64>

Indicates the fraction of the data that must be met in order for a column to be identified as PII data.

§mask_value: Option<String>

Indicates the value that will replace the detected entity.

§redact_text: Option<String>

Specifies whether to redact the detected PII text. When set to true, PII content is replaced with redaction characters.

§redact_char: Option<String>

The character used to replace detected PII content when redaction is enabled. The default redaction character is *.

§match_pattern: Option<String>

A regular expression pattern used to identify additional PII content beyond the standard detection algorithms.

§num_left_chars_to_exclude: Option<i32>

The number of characters to exclude from redaction on the left side of detected PII content. This allows preserving context around the sensitive data.

§num_right_chars_to_exclude: Option<i32>

The number of characters to exclude from redaction on the right side of detected PII content. This allows preserving context around the sensitive data.

§detection_parameters: Option<String>

Additional parameters for configuring PII detection behavior and sensitivity settings.

§detection_sensitivity: Option<String>

The sensitivity level for PII detection. Higher sensitivity levels detect more potential PII but may result in more false positives.

Implementations§

Source§

impl PiiDetection

Source

pub fn name(&self) -> &str

The name of the transform node.

Source

pub fn inputs(&self) -> &[String]

The node ID inputs to the transform.

Source

pub fn pii_type(&self) -> &PiiType

Indicates the type of PIIDetection transform.

Source

pub fn entity_types_to_detect(&self) -> &[String]

Indicates the types of entities the PIIDetection transform will identify as PII data.

PII type entities include: PERSON_NAME, DATE, USA_SNN, EMAIL, USA_ITIN, USA_PASSPORT_NUMBER, PHONE_NUMBER, BANK_ACCOUNT, IP_ADDRESS, MAC_ADDRESS, USA_CPT_CODE, USA_HCPCS_CODE, USA_NATIONAL_DRUG_CODE, USA_MEDICARE_BENEFICIARY_IDENTIFIER, USA_HEALTH_INSURANCE_CLAIM_NUMBER,CREDIT_CARD,USA_NATIONAL_PROVIDER_IDENTIFIER,USA_DEA_NUMBER,USA_DRIVING_LICENSE

Source

pub fn output_column_name(&self) -> Option<&str>

Indicates the output column name that will contain any entity type detected in that row.

Source

pub fn sample_fraction(&self) -> Option<f64>

Indicates the fraction of the data to sample when scanning for PII entities.

Source

pub fn threshold_fraction(&self) -> Option<f64>

Indicates the fraction of the data that must be met in order for a column to be identified as PII data.

Source

pub fn mask_value(&self) -> Option<&str>

Indicates the value that will replace the detected entity.

Source

pub fn redact_text(&self) -> Option<&str>

Specifies whether to redact the detected PII text. When set to true, PII content is replaced with redaction characters.

Source

pub fn redact_char(&self) -> Option<&str>

The character used to replace detected PII content when redaction is enabled. The default redaction character is *.

Source

pub fn match_pattern(&self) -> Option<&str>

A regular expression pattern used to identify additional PII content beyond the standard detection algorithms.

Source

pub fn num_left_chars_to_exclude(&self) -> Option<i32>

The number of characters to exclude from redaction on the left side of detected PII content. This allows preserving context around the sensitive data.

Source

pub fn num_right_chars_to_exclude(&self) -> Option<i32>

The number of characters to exclude from redaction on the right side of detected PII content. This allows preserving context around the sensitive data.

Source

pub fn detection_parameters(&self) -> Option<&str>

Additional parameters for configuring PII detection behavior and sensitivity settings.

Source

pub fn detection_sensitivity(&self) -> Option<&str>

The sensitivity level for PII detection. Higher sensitivity levels detect more potential PII but may result in more false positives.

Source§

impl PiiDetection

Source

pub fn builder() -> PiiDetectionBuilder

Creates a new builder-style object to manufacture PiiDetection.

Trait Implementations§

Source§

impl Clone for PiiDetection

Source§

fn clone(&self) -> PiiDetection

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PiiDetection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PiiDetection

Source§

fn eq(&self, other: &PiiDetection) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for PiiDetection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more