Expand description
High-performance data profiling and quality assessment.
The dataprof crate is the user-facing facade for profiling CSV, JSON,
JSONL, Parquet, database, DataFrame, and Arrow sources. Implementation
details live in the workspace crates under crates/; this package keeps the
public API compact and oriented around Profiler.
§Quick Start
use dataprof::Profiler;
let report = Profiler::new().analyze_file("data.csv")?;
println!("Rows: {}", report.execution.rows_processed);
println!("Quality: {:?}", report.quality_score());Structs§
- Accuracy
Metrics - Accuracy metrics (ISO 25012).
- Analysis
Options - What to analyze, and how, for a single profiling run.
- Analysis
Settings - The analysis settings a report was profiled with that change what its scores measure on unchanged data and are recorded nowhere else in it.
- Async
Source Info - Metadata about an async data source for report construction and progress tracking.
- Async
Streaming Profiler - Async streaming profiler that accepts
AsyncDataSourceinstead of file paths. - Baseline
Comparison - The two reports a baseline-relative evaluation compared, and how their column sets differ.
- Baseline
Reading - What the baseline said about the metric a rule about change reads.
- Boolean
Stats - Statistics for boolean columns.
- Bytes
Source - An in-memory byte buffer that implements
AsyncDataSource. - Check
- One requirement and what the report said about it.
- Check
Bounds - The interval a sampled score was decided on.
- Column
Change - One column’s change. Serialized as an entry of the
columnsobject, keyed by the column’s name. Each side’s number covers what that side’s scan read; seeReportReference::evidence. - Column
Profile - Profiling statistics for a single column.
- Column
Schema - A single column’s name and inferred data type.
- Completeness
Metrics - Completeness metrics (ISO 8000-8).
- Configuration
Comparison - The recorded settings that move a score on unchanged data, on each side.
- Consistency
Metrics - Consistency metrics (ISO 8000-61).
- CsvParser
Config - Configuration for CSV parsing and analysis.
- Database
Config - Database configuration for connection strings and settings
- Database
Credentials - Database credentials management with environment variable support
- Date
Time Stats - Statistics for date/datetime columns.
- Diagnostic
- A schema change between the baseline and the report.
- Dimension
Change - One quality dimension’s change. Serialized as an entry of the
dimensionsobject, keyed by the dimension’s name. - Execution
Metadata - Metadata about the profiling execution.
- Finding
- Something in the report that deserves attention.
- Finding
Policy - The thresholds findings apply.
- Findings
Result - What
FindingPolicy::evaluatefound. - Frequency
Item - A value and its frequency count within a column.
- Gate
Result - The structured result of evaluating a
QualityPolicy. - Http
Parquet Reader - An asynchronous reader that fetches byte ranges from an HTTP server using HTTP Range requests. Designed specifically for remote Parquet parsing.
- IsoQuality
Config - Quality thresholds and score settings informed by ISO 8000/25012 concepts. These values are dataprof configuration, not ISO-mandated parameters.
- Json
Parser Config - Configuration for JSON/JSONL parsing and scanning.
- Metric
Semantics - How the measurements in a report were defined.
- Metrics
Calculator - Engine for calculating comprehensive data quality metrics.
- MySql
Connector - MySQL/MariaDB connector
- Numeric
Stats - Statistics for numeric (integer or float) columns.
- Parquet
Config - Configuration options for Parquet analysis.
- Parquet
Metadata - Metadata specific to Parquet files
- Pattern
- A detected value pattern within a column (e.g. email, phone, UUID).
- Pattern
Metadata - Public metadata for a pattern detector.
- Postgres
Connector - PostgreSQL connector with connection pooling support
- Precision
Metrics - Precision metrics for effective decimal-scale consistency.
- Profile
Report - Complete profiling report for a data source.
- Profiler
- Unified profiler with builder pattern
- Profiler
Config - Plain-data configuration for a profiler
- Quality
Assessment - Wraps quality metrics with confidence information.
- Quality
Metrics - Comprehensive data quality metrics following industry standards.
- Quality
Policy - What a report must satisfy.
- Quality
Score Weights - Relative weights used to aggregate assessed quality dimensions.
- Quality
Scores - Aggregate scores retained alongside rounded metric inputs in saved reports. Recomputing these from rounded ratios can change a threshold decision.
- Quartiles
- Quartile statistics for numeric distributions.
- Recorded
Hints - The semantic hints a report recorded, by the configuration field that carries each, read from its hint bindings.
- Recovery
Event - A failed execution attempt followed by a retry, in chronological order.
- Report
Delta - What changed between two reports. See the module docs for the contract.
- Report
Generator - The dataprof build that produced a report.
- Report
Reference - Which report a side is, and how much of its source it read.
- Report
Side - What a comparison reads from one report.
- Reqwest
Source - An HTTP response body that implements
AsyncDataSource. - RowCount
Estimate - Result of a quick row count operation.
- Schema
Change - Which columns each side has.
- Schema
Result - Result of fast schema inference — column names paired with inferred data types.
- Score
Bounds - Where the scores over every scanned row lie, for an assessment whose scores were partly computed over a retained sample of those rows.
- Score
Change - One score on both sides and how it moved.
- Score
Interval - A range a score lies in, on the 0-100 scale.
- Semantic
Hint Binding - Per-column evidence of whether a semantic hint actually bound to any value.
- Semantic
Hints - User-supplied semantic hints that affect profiling and quality metrics.
- Semantics
Comparison - Each side’s recorded measurement definitions, and whether they agree.
- Setting
Comparison - One recorded setting on each side, and whether the two agree.
- Sides
- The same fact about each side of a comparison.
- Sqlite
Connector - SQLite embedded database connector
- SslConfig
- SSL/TLS configuration for database connections
- Stop
Evaluator - Runtime evaluator that checks a
StopConditionagainst accumulated counters. - Structure
Column Summary - Sample-derived or metadata-derived structural summary for one column.
- Structure
Report - Lightweight structural summary for a file.
- Text
Stats - Statistics for text/string columns.
- Timeliness
Metrics - Timeliness metrics (ISO 8000-8).
- Type
Homogeneity - How a column’s non-null values distribute across
LexicalClasses. - Unevaluated
Rule - A rule that could not be evaluated, and why.
- Uniqueness
Metrics - Uniqueness metrics (ISO 8000-110).
- Validity
Metrics - Validity metrics derived from confidently detected semantic patterns.
Enums§
- Check
Code - Stable identifier for the requirement a check came from.
- Check
Status - What happened to one requirement.
- Chunk
Size - How much data a streaming engine reads per chunk.
- Column
Selection - Which of the source’s columns a run profiled.
- Column
Stats - Type-specific statistics for a column, determined by the inferred data type.
- Count
Method - Method used to obtain the row count.
- Data
Frame Library - Source library for in-memory DataFrame profiling
- Data
Profiler Error - Enhanced error types with more descriptive messages for DataProfiler
- Data
Source - Source-agnostic data source metadata.
- Data
Type - Inferred column data type.
- Diagnostic
Code - Stable identifier for a kind of schema change.
- Engine
Type - Which engine to use for profiling
- Evidence
- Whether the data behind a number covers the whole source.
- Evidence
Gap - Why the data behind a number falls short of the whole source.
- Evidence
Value - One value a finding read from the report, or a threshold it applied.
- Expectation
- The constraint a check applied.
- File
Format - Supported file formats for data profiling
- Finding
Code - Stable identifier for the rule a finding came from.
- Finding
Policy Error - A finding threshold that cannot be applied as written.
- Json
Error Policy - How JSON/JSONL parsing reacts to a malformed record.
- Json
Format - Which grammar a JSON source is read with.
- KeyColumn
Source - Which column
key_uniquenessmay measure, as recorded in a report’s metric semantics. - KeyUniqueness
Units - What
key_uniquenessdivides the key column’s distinct values by, as recorded in a report’s metric semantics. - Lexical
Class - Mutually exclusive lexical form of a single non-null value.
- Locale
- A locale the pattern catalogue carries locale-specific detectors for.
- Metric
Confidence - Confidence level for quality metrics.
- Metric
Pack - High-level categories of analysis that can be selectively enabled.
- Metric
Value - A number a check read, or a threshold it compared against.
- NotEvaluated
- Why a requirement was not evaluated.
- NotEvaluated
Reason - Why a rule produced no finding without having looked.
- Null
Token Set - The null vocabulary a report was measured with, as recorded in its metric semantics.
- Outlier
Units - What
outlier_ratiois measured over, as recorded in a report’s metric semantics. - Pattern
Category - Semantic category for a detected pattern.
- Pattern
Locale - The locale a report’s detected patterns were ranked with:
none, or the ISO 3166-1 alpha-2 code of aLocalethe pattern catalogue supports. - Pattern
Match Count - What a pattern’s
match_countcounts, as recorded in a report’s metric semantics. - Policy
Error - A policy that cannot be evaluated as written.
- Policy
Scope - What the requirements in a policy are statements about.
- Progress
Event - Structured progress events emitted by profiling engines.
- Progress
Sink - How progress events are delivered to the consumer.
- Quality
Analysis Status - Why a report does or does not carry a quality assessment.
- Quality
Dimension - ISO 25012 quality dimensions that can be selectively requested.
- Query
Engine - Supported query engines for SQL-based profiling
- Range
Rule Count - What the range and sign rules of the accuracy score count, as recorded in a report’s metric semantics.
- Recovery
Kind - Recovery boundaries recorded by dataprof.
- Required
Metric - A metric a policy requires to have been analyzed.
- Sampling
Strategy - How rows are selected for profiling.
- Semantic
Hint Kind - The kind of a semantic hint, used for diagnostics and binding evidence.
- Setting
Difference - How a setting that can produce a diagnostic’s change compares across the two reports. A diagnostic carrying one may not reflect a change in the data.
- Severity
- How much attention a finding asks for.
- Shape
Moment Estimator - The estimator behind
skewnessandkurtosis, as recorded in a report’s metric semantics. - Slash
Date Order - The day/month order a column’s slash dates were read in.
- Stop
Condition - A composable condition that can trigger early termination of profiling.
- Text
Length Unit - The unit a report’s text lengths were measured in, as recorded in its metric semantics.
- Truncation
Reason - Reason why profiling was truncated before exhausting the source.
- Verdict
- The overall outcome of a policy.
Constants§
- DEFAULT_
MIXED_ TYPES_ PERCENTAGE - Default for
FindingPolicy::mixed_types_percentage. Matches themixed typesflag in the Python binding’sto_llm_context(). - DEFAULT_
NULL_ HEAVY_ PERCENTAGE - Default for
FindingPolicy::null_heavy_percentage. Matches thenull-heavyflag in the Python binding’sto_llm_context(). - NULL_
MARKERS - Missing-value markers counted as null in exactly this spelling.
- REPORT_
SCHEMA_ VERSION - Version of the serialized
ProfileReportschema written by this build.
Traits§
- Async
Data Source - A source of raw bytes that can be consumed asynchronously.
- Database
Connector - Trait that all database connectors must implement
Functions§
- analyze_
column - Analyze a column with full profiling (includes pattern detection and unique counts)
- analyze_
column_ fast - Analyze a column in fast mode (skips expensive operations)
- analyze_
column_ with_ analysis_ options - Analyze a column, honouring the caller’s analysis selection.
- analyze_
csv_ file - Analyze a CSV file, returning a full
ProfileReport. - analyze_
csv_ from_ reader - Analyze CSV data from any
Readsource using streaming statistics. - analyze_
database - High-level function to analyze a database table or query.
- analyze_
database_ with_ options - Analyze a database table or query, honouring the caller’s full analysis selection.
- analyze_
json_ file - Analyze a JSON or JSONL file, returning a full
ProfileReport. - analyze_
json_ file_ with_ options - Analyze a JSON or JSONL file, honouring the caller’s full analysis selection.
- analyze_
json_ from_ reader - Analyze JSON/JSONL data from a buffered reader using streaming statistics.
- analyze_
parquet_ async_ http - Analyzes a remote Parquet file by fetching it via HTTP Range requests.
- analyze_
parquet_ bytes - Profile Parquet bytes held in memory, without touching the filesystem.
- analyze_
parquet_ bytes_ with_ options - Like
analyze_parquet_bytes, honouring the caller’s full analysis selection. - analyze_
parquet_ with_ config - Analyze a Parquet file with an explicit
ParquetConfig. - analyze_
parquet_ with_ options - Analyze a Parquet file, honouring the caller’s full analysis selection.
- analyze_
parquet_ with_ quality - Analyze a Parquet file with default settings and every quality dimension.
- analyze_
parquet_ with_ quality_ dims - analyze_
structure - Analyze a file’s structure with a bounded, lightweight pass.
- calculate_
datetime_ stats - calculate_
numeric_ stats - calculate_
text_ stats - classify_
lexical_ forms - Distribute
valuesacross the lexical classes, skipping null-like tokens. - create_
connector - Factory function to create appropriate database connector
- detect_
patterns - Detect common data patterns in a column.
- infer_
schema - Infer the schema (column names + data types) of a file.
- infer_
schema_ async - infer_
schema_ stream - Infer schema from any async byte stream.
- infer_
type - is_
null_ like_ token - Whether a text value is null under
NullTokenSet::CommonMarkers. - is_
parquet_ file - Check if a file is a valid Parquet file by examining its magic number.
- lexical_
class - Classify one trimmed, non-null value into its
LexicalClass. - list_
patterns - List supported pattern detectors in detector order.
- quick_
quality_ check - One-liner API for quick profiling with intelligent engine selection.
- quick_
quality_ check_ source - One-liner API for quick profiling from a DataSource.
- quick_
row_ count - Quick row count (exact or estimated) for a file.
- quick_
row_ count_ async - quick_
row_ count_ stream - Quick row count from any async byte stream.
- validate_
unique_ column_ names - Reject repeated names in an ordered column-name list, before any per-column state is built.