pub struct DataQualityInjector { /* private fields */ }Expand description
Main data quality injector.
Implementations§
Source§impl DataQualityInjector
impl DataQualityInjector
Sourcepub fn new(config: DataQualityConfig) -> Self
pub fn new(config: DataQualityConfig) -> Self
Creates a new data quality injector.
Sourcepub fn process_text_field(
&mut self,
field: &str,
value: &str,
record_id: &str,
context: &HashMap<String, String>,
) -> Option<String>
pub fn process_text_field( &mut self, field: &str, value: &str, record_id: &str, context: &HashMap<String, String>, ) -> Option<String>
Processes a text field, potentially introducing quality issues.
Sourcepub fn process_date_field(
&mut self,
field: &str,
date: NaiveDate,
record_id: &str,
context: &HashMap<String, String>,
) -> Option<String>
pub fn process_date_field( &mut self, field: &str, date: NaiveDate, record_id: &str, context: &HashMap<String, String>, ) -> Option<String>
Processes a date field, potentially introducing format variations.
Sourcepub fn process_amount_field(
&mut self,
field: &str,
amount: Decimal,
record_id: &str,
context: &HashMap<String, String>,
) -> Option<String>
pub fn process_amount_field( &mut self, field: &str, amount: Decimal, record_id: &str, context: &HashMap<String, String>, ) -> Option<String>
Processes an amount field, potentially introducing format variations.
Sourcepub fn process_identifier_field(
&mut self,
field: &str,
id: &str,
record_id: &str,
context: &HashMap<String, String>,
) -> Option<String>
pub fn process_identifier_field( &mut self, field: &str, id: &str, record_id: &str, context: &HashMap<String, String>, ) -> Option<String>
Processes an identifier field, potentially introducing variations.
Sourcepub fn should_duplicate(&mut self) -> bool
pub fn should_duplicate(&mut self) -> bool
Determines if a record should be duplicated.
Sourcepub fn stats(&self) -> &DataQualityStats
pub fn stats(&self) -> &DataQualityStats
Returns statistics.
Sourcepub fn issues(&self) -> &[QualityIssue]
pub fn issues(&self) -> &[QualityIssue]
Returns all recorded issues.
Sourcepub fn issues_for_record(&self, record_id: &str) -> Vec<&QualityIssue>
pub fn issues_for_record(&self, record_id: &str) -> Vec<&QualityIssue>
Returns issues for a specific record.
Sourcepub fn issues_by_type(&self, issue_type: QualityIssueType) -> Vec<&QualityIssue>
pub fn issues_by_type(&self, issue_type: QualityIssueType) -> Vec<&QualityIssue>
Returns issues of a specific type.
Sourcepub fn update_stats(&mut self)
pub fn update_stats(&mut self)
Updates aggregate statistics.
Auto Trait Implementations§
impl Freeze for DataQualityInjector
impl RefUnwindSafe for DataQualityInjector
impl Send for DataQualityInjector
impl Sync for DataQualityInjector
impl Unpin for DataQualityInjector
impl UnwindSafe for DataQualityInjector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more