Install and load
Run these commands in a Haybarn SQL session. The extension is available from the community repository.
INSTALL anofox_tabular FROM community;
LOAD anofox_tabular FROM community;
Using upstream DuckDB? Follow the maintainer’s installation instructions.
Usage example
Validate contact data
-- Validate contact data
SELECT email_is_valid('[email protected]'), vat_is_valid('DE136695976');
-- Find and mask PII in free text
SELECT pii_mask('Reach [email protected], card 4111 1111 1111 1111', 'redact');
-- Reach [EMAIL], card [CREDIT_CARD]
-- A data quality check: one pass/fail row with a message
CREATE TABLE orders AS
SELECT i AS id, CASE WHEN i % 50 = 0 THEN NULL ELSE i % 7 END AS customer_id,
CASE WHEN i = 77 THEN 99999.0 ELSE 20 + i % 13 END AS amount
FROM range(1, 501) t(i);
SELECT status, message FROM null_rate('orders', 'customer_id', 0.01);
-- fail | Null rate 0.02 (10/500) exceeds maximum 0.01
-- Anomaly scores with Isolation Forest (trees, sample size, contamination)
SELECT * FROM isolation_forest('orders', 'amount', 100, 256, 0.1, 'scores')
ORDER BY anomaly_score DESC LIMIT 3;
Provided by DataZooDE. Not yet verified on Haybarn 2.0.0.
Sample data & setupAbout this extension
Anofox Tabular brings data quality engineering into DuckDB: checks that return pass/fail assertion rows, check suites defined in a SQL table, profiling, table diffs for migration validation, and anomaly detection, plus validators and normalizers for emails, addresses, phone numbers, EU VAT IDs, money and PII. Everything runs locally inside DuckDB.
Functions carry an anofox_tab_ prefix and a short alias (email_is_valid for anofox_tab_email_is_valid). Documentation: https://github.com/DataZooDE/anofox-tabular/blob/main/docs/README.md
Project overview from the community descriptor.
Documentation and resources
Project and build details
- Repository
- DataZooDE/anofox-tabular
- License
- BSL 1.1
- Maintainers
- jrosskopf
- Written in
- C++
- Build source
280cca399195- Build definition
- Community descriptor