<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abhishek Kaushik</title>
    <description>The latest articles on DEV Community by Abhishek Kaushik (@abhishek_kaushik_d7688e66).</description>
    <link>https://dev.to/abhishek_kaushik_d7688e66</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1539684%2F51b6a97c-90a1-412f-ac08-815d8e3f34bf.png</url>
      <title>DEV Community: Abhishek Kaushik</title>
      <link>https://dev.to/abhishek_kaushik_d7688e66</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhishek_kaushik_d7688e66"/>
    <language>en</language>
    <item>
      <title>I built a CLI data quality tool that goes beyond schema checks - here's what I learned</title>
      <dc:creator>Abhishek Kaushik</dc:creator>
      <pubDate>Fri, 03 Apr 2026 12:56:50 +0000</pubDate>
      <link>https://dev.to/abhishek_kaushik_d7688e66/i-built-a-cli-data-quality-tool-that-goes-beyond-schema-checks-heres-what-i-learned-pki</link>
      <guid>https://dev.to/abhishek_kaushik_d7688e66/i-built-a-cli-data-quality-tool-that-goes-beyond-schema-checks-heres-what-i-learned-pki</guid>
      <description>&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdmajqxlm09ii0q96zeo9.gif" alt=" " width="1028" height="1098"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  What SageScan does differently
&lt;/h2&gt;

&lt;p&gt;SageScan is a &lt;strong&gt;CLI tool&lt;/strong&gt; that runs statistical validation using a YAML config.&lt;/p&gt;

&lt;p&gt;Instead of checking rules you define manually, it checks:&lt;br&gt;
whether your data behaves like it used to.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Distribution drift (KS test)
&lt;/h3&gt;

&lt;p&gt;Compares current vs baseline distribution.&lt;/p&gt;

&lt;p&gt;Catches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ETL bugs&lt;/li&gt;
&lt;li&gt;upstream schema changes&lt;/li&gt;
&lt;li&gt;silent corruption&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Outlier detection (Z-score + IQR)
&lt;/h3&gt;

&lt;p&gt;Flags statistically abnormal rows.&lt;/p&gt;

&lt;p&gt;Not:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"outside a fixed range"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"outside what the data itself considers normal"&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  3. Population Stability Index (PSI)
&lt;/h3&gt;

&lt;p&gt;Used in ML pipelines for drift detection.&lt;/p&gt;

&lt;p&gt;Quantifies:&lt;br&gt;
how much a column’s distribution has shifted&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Categorical drift (Chi-square test)
&lt;/h3&gt;

&lt;p&gt;Detects changes in category distribution.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Credit card usage drops from 80% -&amp;gt; 45%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's not invalid data.&lt;br&gt;
That's a signal.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture (the controversial part)
&lt;/h2&gt;

&lt;p&gt;This is where I'd love feedback.&lt;/p&gt;

&lt;p&gt;SageScan is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Go CLI&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python engine&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They communicate via JSON over stdin/stdout.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Go → fast, portable CLI (great for CI)&lt;/li&gt;
&lt;li&gt;Python → pandas, scipy, rich data ecosystem&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of choosing one:&lt;br&gt;
I used both.&lt;/p&gt;

&lt;p&gt;Flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go binary parses config&lt;/li&gt;
&lt;li&gt;Sends JSON to Python&lt;/li&gt;
&lt;li&gt;Python runs checks&lt;/li&gt;
&lt;li&gt;Returns results&lt;/li&gt;
&lt;li&gt;CLI exits with CI-friendly status&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Is this the “right” approach?
&lt;/h3&gt;

&lt;p&gt;Honestly, I don’t know.&lt;/p&gt;

&lt;p&gt;But:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It shipped&lt;/li&gt;
&lt;li&gt;It works&lt;/li&gt;
&lt;li&gt;It was faster than rewriting everything in one stack&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Curious how others would approach this.&lt;/p&gt;




&lt;h2&gt;
  
  
  The AI layer (kept intentionally minimal)
&lt;/h2&gt;

&lt;p&gt;There's an optional AI feature.&lt;/p&gt;

&lt;p&gt;When a check fails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Structured context is sent to an LLM&lt;/li&gt;
&lt;li&gt;It returns possible root causes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Negative fare amounts typically indicate chargebacks or voided transactions…"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Important:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ AI does NOT replace checks&lt;/li&gt;
&lt;li&gt;✅ It only explains failures&lt;/li&gt;
&lt;li&gt;✅ It's optional&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What I’d do differently
&lt;/h2&gt;

&lt;p&gt;If I started again:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Add Polars earlier&lt;/strong&gt;&lt;br&gt;
Pandas struggles with larger datasets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Improve packaging&lt;/strong&gt;&lt;br&gt;
Go + Python split adds friction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Build connectors sooner&lt;/strong&gt;&lt;br&gt;
Everyone asked for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Postgres&lt;/li&gt;
&lt;li&gt;Snowflake&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CSV-first was good for shipping, but not enough.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;sagescan-data
sagescan validate rules.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Looking for feedback
&lt;/h2&gt;

&lt;p&gt;Would love thoughts on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go + Python architecture — good tradeoff or bad idea?&lt;/li&gt;
&lt;li&gt;Are these statistical checks enough / overkill?&lt;/li&gt;
&lt;li&gt;What would you add for real-world pipelines?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/abhishek09827/SageScan" rel="noopener noreferrer"&gt;https://github.com/abhishek09827/SageScan&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>dataengineering</category>
      <category>opensource</category>
      <category>cli</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
