Articles

/

Case Study: Transforming Pharmaceutical Supply Chain Data at DataTyr

Case Study: Transforming Pharmaceutical Supply Chain Data at DataTyr

Elevating DataTyr’s operations with cutting-edge data integration and AI.

Blog Image

The Client

DataTyr specializes in aggregating and managing supply chain data, covering sales, prices, and inventory from multiple pharmaceutical wholesalers and vendors across Africa. Operating in markets where unified product codes (UPC) do not exist, DataTyr takes on the challenge of collating and standardizing heterogeneous datasets that come from a variety of ERP systems. Their success depends on providing accurate, up-to-date information to stakeholders, from government regulatory bodies to international pharmaceutical companies.

The Challenge

Over time, the volume of DataTyr’s incoming data grew exponentially, and the lack of a consistent product identification system compounded the complexity. Wholesalers often used their own SKU references, trade names varied from country to country, and different distributors might offer slight variations of the same chemical formulation. 

As a result, data quality issues surfaced in several key areas:

  1. Entity Resolution: Without a universal standard, DataTyr struggled to unify records of the same product. Acetaminophen, for instance, might appear as “Tylenol 500 mg capsules” from one distributor and “Panadol 500 mg tablets” from another, obscuring a clear view of total sales and stock.
  2. Pricing Reconciliation: Government agencies frequently change official price limits, requiring quick retroactive adjustments. Manual updates were both error-prone and time-consuming, as historical records had to be revised accurately for compliance.
  3. Data Volume and Variability: Multiple ERP systems across the supply chain introduced conflicting data formats and incomplete records. The overhead of cleaning, harmonizing, and storing these large datasets slowed down critical reporting and decision-making.
    The scale is massive: multiple countries, thousands of pharmacies, hundreds of wholesalers, tens of thousands of products, and millions of sales transactions.
  4. Disparate Processing Environments: Initially, DataTyr housed data in Google BigQuery, with computational logic and automation scripts running externally via Google Apps. The arrangement worked at a small scale but began to falter as data volumes ballooned.

The Solution

Establishing a Robust Entity Resolution Framework
Syntaxia designed an intelligent matching system to correlate trade names and SKUs back to a single “core” product record. Through a combination of string-matching algorithms, reference dictionaries, and heuristic models, DataTyr could see that “Panadol” and “Tylenol” share the same chemical name (Acetaminophen), effectively collapsing scattered records into one unified view.

Backward-Compatible Pricing Updates
Syntaxia introduced functionality to update prices and margins historically, an especially important feature in heavily regulated markets where product prices often change abruptly when government agencies issue new mandates. For example, a wholesaler might have purchased a particular medication at an approved price X, intending to sell it at X with a certain profit margin. If the government then announces a new official price (or margin) that takes effect on a specific date, the wholesaler must adjust inventory records to reflect these updates, often splitting their stock between items purchased under the old price and those subject to the new pricing rules.

To address this, Syntaxia engineered a “retroactive” pricing mechanism that tracks price changes over time without erasing historical accuracy. As soon as a new price goes into effect, DataTyr’s system automatically applies the updated rates to all future transactions while preserving the older price in existing inventory records. This ensures that previously purchased stock is still recorded under its original cost basis and profit structure. Meanwhile, any new purchases and sales adopt the fresh government-mandated price from the specified date onward. The system then “ripples” these updates through relevant data tables to keep every historical record legally compliant, yet perfectly aligned with real-world inventory conditions. All of this happens with minimal manual intervention, preventing the chaos of disconnected system overrides.

BigQuery Foundation and Early Gains
As a first step, Syntaxia built an architecture leveraging Google BigQuery for data warehousing. Custom JavaScript code (running in Google Apps) interfaced with BigQuery SQL to perform intermediate transformations and automation. This shift provided immediate improvements in data transparency and reduced repetitive manual tasks related to data harmonization, entity resolution and reporting.

Migrating to Snowflake and Snowpark
Once Snowflake introduced Snowpark Container Services, Syntaxia replicated the core solution in a new environment. By migrating data pipelines and entity resolution logic inside the warehouse, DataTyr gained a notable performance boost: jobs that used to take hours in the BigQuery + external script model now ran in minutes. This dramatic speed increase allowed DataTyr to handle more complex analytics, onboard new suppliers faster, and reduce operational overhead.

The key advantage of running applications within Snowpark Container Services is that the data never has to leave the warehouse for processing. Traditional approaches often require moving data out to external memory or servers for computation, then piping the results back in which is an extra step that slows performance and adds complexity. By computing everything inside Snowflake, DataTyr streamlined its workflows, minimized data movement, and drastically improved both speed and resource efficiency.

The Results

DataTyr’s newly integrated ecosystem resolved what used to be a highly fragmented data landscape. Instead of juggling multiple inconsistent product IDs and pricing records:

  • Consistent Product Data: The entity resolution engine consolidated variant product listings into a single chemical reference, drastically improving the accuracy and completeness of sales and stock metrics.
  • Rapid Price Adjustments: Automated retroactive updates ensured swift compliance with government mandates, avoiding financial and regulatory risks associated with delayed or inaccurate price revisions.
  • Enhanced Productivity and Scale: Offloading heavy computational logic to Snowflake shrank hours of data processing down to minutes. Staff could redirect time and energy to strategic tasks like market expansion and partnership development.
  • Regulatory Confidence: Government agencies and pharmaceutical partners now rely on more precise, timely data, strengthening DataTyr’s reputation as a trusted source for end-to-end supply chain intelligence in the region.

Conclusion

By introducing a cohesive entity resolution framework, automated pricing reconciliation, and advanced in-warehouse computation, Syntaxia transformed DataTyr’s chaotic sprawl of pharmaceutical data into a structured, high-performance system. That clarity and precision have pushed DataTyr to a leadership position within African pharmaceutical supply chains. As the company continues to expand into new markets, it can rely on a future-proof data architecture that accommodates regulatory changes, diverse naming conventions, and growing transaction volumes, all while enabling real-time insights and streamlined operations.

Author

Quentin O. Kasseh

Quentin has over 15 years of experience designing cloud-based, AI-powered data platforms. As the founder of other tech startups, he specializes in transforming complex data into scalable solutions.

Read Bio
article-iconarticle-icon

Recommended Articles

Blog Image
MDM is dead!

Long live MDM

Read More
article-iconarticle-icon
Blog Image
Case Study: Enhancing Economic Development with Syntaxia

Boosting EDO’s productivity through strategic technology & AI recommendations.

Read More
article-iconarticle-icon
Blog Image
The Illusion of “Simple”

Why Data Pipelines Are More Complex Than You Think

Read More
article-iconarticle-icon