<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ganesh Jadhavar on Medium]]></title>
        <description><![CDATA[Stories by Ganesh Jadhavar on Medium]]></description>
        <link>https://medium.com/@ganeshjadhavar?source=rss-efde6aa90aed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Ganesh Jadhavar on Medium</title>
            <link>https://medium.com/@ganeshjadhavar?source=rss-efde6aa90aed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 04:47:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ganeshjadhavar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How We Made IBM Data Quality Rules Run in Seconds Instead of Hours]]></title>
            <link>https://medium.com/@ganeshjadhavar/how-we-made-ibm-data-quality-rules-run-in-seconds-instead-of-hours-49408f5f4fbc?source=rss-efde6aa90aed------2</link>
            <guid isPermaLink="false">https://medium.com/p/49408f5f4fbc</guid>
            <category><![CDATA[ibm-knowledge-catalog]]></category>
            <category><![CDATA[data-quality]]></category>
            <category><![CDATA[optimization]]></category>
            <dc:creator><![CDATA[Ganesh Jadhavar]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 06:43:50 GMT</pubDate>
            <atom:updated>2026-07-20T06:43:50.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pVQ6sE5Bv-Bl1HbiK2rTzQ.png" /></figure><p>Enterprise data platforms eventually hit the same wall: hundreds of millions of rows to validate, a finite compute budget, and a data governance team asking why their nightly data quality jobs take the better part of a working day. This is the story of how we solved that problem for IBM Knowledge Catalog’s Data Quality engine by moving rule assessment out of DataStage and into the source database.</p><h3>What Are Data Quality Rules?</h3><p>IBM Data Quality rules are business-defined validation conditions that measure whether data meets the standards an organization cares about. Think of them as executable assertions: <em>“every customer record must have a valid date of birth”</em>, <em>“account balance must never be negative”</em>, <em>“postal code must match the country”</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k5C_3lPyhiMoOQnH4Acuxw.png" /><figcaption><em>IBM Cloud Pak for Data: the DQ rule editor for </em><em>AgeMaritalStatusConsistency. The rule expression (right panel) is authored in a high-level expression language and compiled to SQL at assessment time.</em></figcaption></figure><p>Rules are authored in a high-level expression language that is readable by data stewards, not just engineers. Rules can reference columns, apply built-in functions (trim, in_reference_column, date functions, and around 100 others), and compose conditions with if/then/else, AND, and OR logic. When you run an assessment, the engine evaluates each rule against your data, produces pass/fail statistics, and optionally writes exception records to an output table for downstream remediation.</p><p>IBM Docs: <a href="https://www.ibm.com/docs/en/ws-and-kc?topic=quality-managing-data-rules">Managing Data Rules</a></p><h3>The Problem: Moving Mountains of Data</h3><p>The original architecture for DQ rule assessment follows six steps, and the expensive one is step 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ANYPXgHdnCDC4b3lpdmYWw.png" /><figcaption><em>The traditional DQ rule assessment architecture. Step 3 is where the cost lives: every row crosses the network into the DataStage engine before a single rule condition is evaluated.</em></figcaption></figure><p>Before any rule logic runs, the entire source table travels across the network into the DataStage engine. For a 500-million-row table on Databricks, the DataStage flow looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wv_PWrg07nPi7u-L4-Tbiw.png" /><figcaption><em>DataStage flow </em><em>t500m_read: a Databricks source connector feeding 500 million rows through a Modify stage. At 18,194 rows/sec, the math is unforgiving.</em></figcaption></figure><p>And here is what that run costs in wall-clock time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1W-N-8dvfNhjQNpWQuIbjA.png" /><figcaption><em>Job run for </em><em>t500m_read: </em><strong><em>7 hours and 47 minutes</em></strong><em> to pull 500 million rows from Databricks into DataStage, before rule evaluation even begins.</em></figcaption></figure><p><strong>Seven hours and forty-seven minutes.</strong> Just to move the data. Not to assess it, just to read it across the network.</p><p>The failure modes were consistent across customer environments:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uocgEL0qhcY_7ltOOPgzTg.png" /></figure><h3>The Insight: Push the Work to Where the Data Lives</h3><p>The fix is visible in a single diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vuBfvcqFI4tFGky9E9F7Vg.png" /><figcaption><em>Traditional vs SQL pushdown: the only meaningful change is where the </em><em>DQ rule assessment box lives. In the traditional path it sits inside DataStage, fed by 500M rows. In the pushdown path it moves to the Source, and DataStage receives a single statistics row.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mtMJw8aX72kgVCTPwgqLGA.png" /></figure><p>One box moved. Everything else stays identical: the Control Plane, DataStage flows, the callback. The DQ rule assessment box relocates from the DataStage engine to the Source, and step 3 goes from pulling every record to pulling a single aggregated result.</p><p>The database evaluates the rule as a SQL query. DataStage receives the answer, not the raw data.</p><h3>The Implementation Challenge: Compiling Rules to SQL</h3><p>The DQ expression language supports approximately <strong>100 different functions, tests, and operations</strong>: date checks, string matching, reference column lookups, numeric range tests, and more. The challenge was not understanding what each function does, it was translating all of them into SQL that runs correctly across different database dialects.</p><p>The solution is a compiler built on <a href="https://calcite.apache.org/">Apache Calcite</a>, a SQL query planning framework used inside Hive, Flink, and Druid. Calcite provides a Java object model for SQL: instead of concatenating SQL strings, the compiler builds an in-memory tree of SqlNode objects and renders it to the target dialect at the end. Spark SQL, ANSI SQL, DB2 - same compiler, different renderer.</p><p>The pipeline:</p><ol><li><strong>Parse</strong> the DQ rule expression into an AST.</li><li><strong>Bind</strong> rule variables to source table columns using schema metadata.</li><li><strong>Lower</strong> each AST node into a Calcite SqlNode, the dialect-agnostic SQL representation.</li><li><strong>Render</strong> the SqlNode tree to the target dialect (Spark SQL, ANSI SQL, etc.).</li></ol><p>A rule like if age &lt; 18 then trim(marital_status) = &quot;child&quot; becomes a validated, executable SQL expression with correct precedence, correct quoting, and correct type coercions, without a line of string concatenation.</p><h3>What the Generated SQL Looks Like</h3><p>For a simple single-column rule like age &lt; 18 AND marital_status = &#39;child&#39;, the compiler generates:</p><pre>SELECT<br>  COUNT(*)                                                                     AS total_records,<br>  SUM(CASE WHEN NOT (age &lt; 18 AND marital_status = &#39;child&#39;) THEN 1 ELSE 0 END) AS failed_records,<br>  SUM(CASE WHEN (age &lt; 18 AND marital_status = &#39;child&#39;) THEN 1 ELSE 0 END)     AS passed_records<br>FROM customers</pre><p>The rule condition becomes a SQL expression. The entire assessment runs in a single query at the source.</p><h3>The Performance Results</h3><p>The baseline: pulling 500 million rows from Databricks into DataStage took <strong>7 hours and 47 minutes</strong>, and that was just the data read. Java row-by-row assessment added further time on top before any statistics were produced.</p><p><strong>Simple rule, single column — 500 million rows:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a51iMZ8wiaSkSgKarJn5Iw.png" /><figcaption><em>ValidNumberRule with SQL pushdown: 500 million rows assessed in </em><strong><em>19 seconds</em></strong><em>. The database evaluated the rule condition and returned a single statistics row.</em></figcaption></figure><p><strong>Complex rule, 27 columns — 500 million rows:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*43OQ_9blzsWYOAA3vX7YxA.png" /><figcaption><em>Rule with SQL pushdown: a rule spanning 27 columns with more complex predicate logic completed in </em><strong><em>9 minutes 15 seconds</em></strong><em>. Two consistent runs confirm the result.</em></figcaption></figure><p>The 27-column rule takes longer than the single-column rule and that is expected. A rule with more conditions across more columns produces a more complex SQL expression, and the source database does proportionally more work to evaluate it. The traditional path offered no such scaling: it always pulled every row first, then assessed row-by-row in Java, so both rules would have incurred the full data movement cost plus assessment time. With pushdown, the cost reflects actual rule complexity, not the cost of moving data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4d2ZEk-CsIY14a7RsyuTRg.png" /></figure><h3>How to Enable It</h3><p>Pushdown is enabled by default for every project in IBM Cloud Pak for Data. No configuration is required to get started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RtA8jM8h7mnaIglQUwgLOg.png" /><figcaption><em>Project settings in IBM Cloud Pak for Data: the “Pushdown of data quality rules” toggle under Manage &gt; Data quality. On by default.</em></figcaption></figure><p>The setting lives under your project’s <strong>Manage</strong> tab, in the <strong>Data quality</strong> section. You can turn it off for a specific project if needed, but in most cases there is no reason to.</p><p>Pushdown applies automatically when the following conditions are met:</p><ul><li>The data source is a <strong>Databricks connection</strong>.</li><li>The rule is configured <strong>without an output table</strong>.</li></ul><p>When those conditions are not met, the platform falls back to the standard DataStage-based assessment path transparently. No rule changes are required and no jobs need to be reconfigured.</p><p>IBM Docs: <a href="https://www.ibm.com/docs/en/ws-and-kc?topic=quality-assessing-data-rules#pushdown">Assessing data rules: Pushdown</a></p><h3>What’s Next: Output Table Pushdown</h3><p>The current pushdown covers expression-only rules, the rules that compute statistics. But DQ rules have another major feature: output tables. When configured, the engine writes individual passing or failing records to an external database table for remediation workflows.</p><p>Today, output table rules force a fallback to the full DataStage path. All rows move, Java assesses them, and failing rows are routed to the output table writer. This is the dominant pattern for data stewards: read-only access to the source, write access only to the output database.</p><p>The next phase extends pushdown to cover these rules. The rule condition is still evaluated at the source and no rows move until after the assessment. DataStage acts as a conduit: it receives the filtered output records from the source and writes them to the output table, while saving the rule statistics as it does today. The source connection stays read-only throughout.</p><p>This removes the last major reason for the DataStage full-scan fallback and covers the most common real-world DQ deployment pattern.</p><p>IBM Docs: <a href="https://www.ibm.com/docs/en/ws-and-kc?topic=tools-data-quality#dq-pushdown">SQL Pushdown for Data Quality</a></p><h3>Summary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xLOGLUyw52IMUyfVdtCyjQ.png" /></figure><p>SQL pushdown turns the DQ assessment problem around. Instead of bringing data to the logic, we bring the logic to the data. For IBM Watson Studio and Knowledge Catalog customers managing data quality at scale, this is the difference between a feature that works in demos and a feature that works in production.</p><p><em>Ganesh Jadhavar is a software engineer at IBM working on the IBM Knowledge Catalog platform. This feature ships as part of the IBM Data Quality SQL Pushdown capability.</em></p><p><em>IBM Docs references:</em></p><ul><li><a href="https://www.ibm.com/docs/en/ws-and-kc?topic=quality-managing-data-rules"><em>Managing Data Rules</em></a></li><li><a href="https://www.ibm.com/docs/en/ws-and-kc?topic=tools-data-quality#dq-pushdown"><em>Data Quality SQL Pushdown</em></a></li><li><a href="https://www.ibm.com/docs/en/ws-and-kc?topic=quality-assessing-data-rules#pushdown"><em>Assessing Data Rules: Pushdown</em></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49408f5f4fbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reducing data movement cost with DataStage Anywhere in Data Quality Rule]]></title>
            <link>https://medium.com/@ganeshjadhavar/reducing-data-movement-cost-with-datastage-anywhere-in-data-quality-rule-e8004f352cce?source=rss-efde6aa90aed------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8004f352cce</guid>
            <category><![CDATA[ibm-data-science]]></category>
            <dc:creator><![CDATA[Ganesh Jadhavar]]></dc:creator>
            <pubDate>Mon, 09 Jun 2025 03:26:04 GMT</pubDate>
            <atom:updated>2025-06-09T03:26:04.098Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ch26r7xb_mZ3iWyXdRdYIw.avif" /></figure><p>Managing Data Quality needs of an organization becomes more and more challenging while keeping up with the regulatory compliances and managing the cost of the Data Quality assessments. Some sovereigns restrict the data movement to a particular geo location. Which makes it difficult to work with such data source in a SaaS product. Sometimes the data egress cost and the data movement cost makes it financially challenging to deal with such sources. IBM introduced <a href="https://dataplatform.cloud.ibm.com/docs/content/dstage/dsnav/topics/remote-engine.html?context=cpdaas">DataStage-aaS Anywhere</a> to allow processing of such sources closer to the source location.</p><p><a href="https://dataplatform.cloud.ibm.com/docs/content/wsj/quality/data-quality.html?context=cpdaas&amp;audience=wdp">Data Quality Rules</a> which are part of IBM Knowledge Catalog are used to measure and monitor the quality of the data. These rules are specified in the form of a boolean expression which is applied against each data row to assess the quality of it. It uses DataStage as a processing engine. The final assessment is consolidated into a quality score of a data asset. This helps data stewards to identify the quality of data asset visually with a single glance.</p><p>User’s can setup DataStage Anywhere to be used by the Data Quality Rules. This ensures that the quality assessment for the user data happens at the user specified location. It can be deployed with any <a href="https://github.com/IBM/DataStage/tree/main/RemoteEngine/kubernetes">container management platform</a>. It can be setup even as a <a href="https://github.com/IBM/DataStage/tree/main/RemoteEngine/docker">standalone docker</a>.</p><p>Here is the data flow with and without DataStage Anywhere(remote engine)-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b5zJ3WApqsoztC2Hoa8siw.png" /></figure><h3>Benefits of the Solution</h3><p><strong>Data sovereignty</strong> — the data does not move out of the customer premises. It helps adhere to the regulatory compliances. <br><strong>Reduced the data movement cost </strong>— the data moves out of the source and processed by the remote engine. It reduces the network latency and the transfer cost.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8004f352cce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>