Skip to main content

Crafting Business Brilliance: Leveraging Databricks SQL for Next-Gen Applications

Summary

  • Data delivery at scale: Haleon built customer-facing applications leveraging Databricks SQL APIs and serverless compute to deliver SAP invoice and order management data through front-end applications.
  • Performance achieved: The solution delivers sub-3-second API response times while eliminating friction from directly accessing operational SAP systems, enhancing performance and user experience.
  • Business impact: The implementation achieved a 15% reduction in customer service costs and a 28% increase in productivity for the support team through improved data accessibility.

Crafting Business Brilliance: Leveraging Databricks SQL for Next-Gen Applications

Watch: Crafting Business Brilliance: Leveraging Databricks SQL for Next-Gen Applications
Talk by Mohammad Shalchi, Director of Software Engineering, Haleon ; Wasim Ahmad, Manager Field Engineering, Databricks
At Haleon, we've leveraged Databricks APIs and serverless compute to develop customer-facing applications for our business. This innovative solution enables us to efficiently deliver SAP invoice and order management data through front-end applications developed and served via our API Gateway. The Databricks lakehouse architecture has been instrumental in eliminating the friction associated with directly accessing SAP data from operational systems, while enhancing our performance capabilities. Our system acheived response times of less than 3 seconds from API call, with ongoing efforts to optimise this performance. This architecture not only streamlines our data and application ecosystem but also paves the way for integrating GenAI capabilities with robust governance measures for our future infrastructure. The implementation of this solution has yielded significant benefits, including a 15% reduction in customer service costs and a 28% increase in productivity for our customer support team.
Here's more to explore:
The best data warehouse is a lakehouse: https://www.databricks.com/product/databricks-sql
How to migrate legacy data warehouses: https://www.databricks.com/resources/ebook/migrate-your-legacy-data-warehouse-databricks
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements

FAQs

What did Haleon build with Databricks?

Haleon built customer-facing applications using Databricks SQL APIs and serverless compute to efficiently deliver SAP invoice and order management data through front-end applications served via API Gateway.

What performance does the solution achieve?

The solution delivers API response times of less than 3 seconds, with ongoing optimization efforts to further improve performance for customer-facing operations.

What business benefits did Haleon realize?

Haleon achieved a 15% reduction in customer service costs and a 28% increase in productivity for its customer support team through improved data accessibility and application performance.

What is Haleon's next step?

Haleon plans to integrate GenAI capabilities into their infrastructure with robust governance measures, leveraging the lakehouse foundation built for its customer-facing applications.

Full transcript

Hello everyone. Um, thank you for joining our talk today. Um, hopefully we can keep on time. Um, so today we're going to talk to you about crafting brilli uh, business brilliance uh, leveraging data bricks SQL for nextgen applications. So this is a real world example of how we used uh our enterprise data lake connected with data bricks to leverage the data there to be used on nextgen applications. Um so a little bit about myself.
Um so I'm the director of software engineering at. Um so I oversee quite a broad portfolio which includes our web estate shared capabilities and integration. Um, I'm from the United Kingdom, as you could probably tell from my accent. Um, by background, I'm a software engineer. So, I've been um using Node. js since about 2014. Um, I've previously worked at M&S and ASOS where we moved them from monoliths to microservices to enable them to scale globally.
Um, then I moved to Walgreens Boots Alliance. So I led the boots. com transformation over from web commerce over to microservices and then GSK which recently divested its consumer healthcare business to create halon which is where I am today. Hi everyone, thank you for joining our session today. Uh I'm Vasim Ahmed uh manager of field engineering in data bricks uh working with mo and his team for last two years um and working in the industry for nearly 20 years.
Yeah, really looking forward to share our experiences with you and how we leveraging data and AI for Halen success. Brilliant. Um, so what is Haleon and what do we do? Um, so GSK previously had three parts to it business farmer, vaccine and consumer healthcare. Haleon is the consumer healthcare arm of what was part of GSK until July 2022. Uh, we own brands such as Sensine, Voltron, Panadol and Centrum. These brands are synonymous with health and well-being um across the globe.
We're a Fitzy 20 company and we operate in over 170 markets worldwide. So, we make a difference to global health and well-being across the world. Our mission is clear, delivering better everyday health with humanity. This means we are committed to providing science-backed products which not only meet the needs of our consumers but also enhances their well-being. Our extensive reach means we can meet a diverse set of needs across different cultures and communities.
At Haleon, we're committed to addressing health accessibility, promoting self-care, and advancing preventative health at scale. This means happier and healthier lives for everybody. So what's our approach to 170 markets? Scaling globally is really, really tricky. Companies often struggle between what they do globally and what they do locally. And I've seen this in every single company that I've worked for. It's a common pitfall to assume that what's worked in one market will work in every other market.
But that's very, very rarely the case. So I'll give you I'll give you an example. In India they have a concept of a karana store. A kirana store is a local corner shop. Now you would have assumed that these corner shops would disappear once Amazon came into the picture. But they didn't. They actually thrived by partnering with Amazon and adopting mobile payments and deliveries whilst keeping their human touch. And the same is the case in other parts of the world.
So if you look in the Gulf in the Middle East, they have a concept of a bala stores, right? Which is a local grocery stores. They succeeded by partnering with, an Uber company to expand market share. You don't beat local relevance. You partner with it. Success doesn't come from rigid systems. It comes from systems that offer strong foundations and local flexibility, giving local marketeers the tools they need to meet the local consumer needs.
And that's exactly the approach we take at. We we think about as motorways or or in the US you'd say highways, right? And neighborhoods. So motorways are our strong foundations, right? These are the strong foundational capabilities that allow us to scale. So this is uniformity in our data, in our infrastructure, in our platforms. And on the flip side, local freedom. This is where we could tailor experiences, features, and integrations.
These are what we think of as neighborhoods. So neighborhoods that define their own cultures, build their own streets, build their own cult, build their own um build their own uh neighborhoods. I always tell my team, without strong foundations, you lose control. Without local flexibility, you lose relevance. Success comes from those who can find the balance between the two. And that's exactly what we try to do with our data.
So why is data and AI not just a nice to have but absolutely essential to everything that we do at? These are the seven key areas where data and AI are making a significant impact. The first is operational efficiency. AI is revolutionizing the way we do maintenance and downtime through predictive analytics. With AI enabled monitoring, we could see the performance of our factories and warehouses. For the first time, because of data and AI, we're able to think about running our production and production and um uh production f facilities around the clock, right?
Meeting the growing customer demand. The second one is net revenue management. AILE dynamic pricing and promotion optimization is helping us maximize trade opportunities. Enhanced demand forecasting gives us more accurate planning and market and retailer segmentation is improving our trade spend return on investment. And AI is also changing the way we're approaching innovation. For the first time, we're using Genai for in the areas of claims development, packaging, content creation, and content approval.
We're also looking at how we can use it for scientific to analyze scientific and regulatory text, which means we could speed up and make better R&D decisions in the areas of supply chain and sustainability. Right? We all have net zero targets. AI optimized logistics helps us reduce our emissions scenario modeling for sourcing and fulfillment resilience. And we're using real-time data for stock management and replenishment in the areas of commercial agility.
We're making quicker decision- making through real-time dashboards. We can now see the performance of our SKUs, which SKs are doing well, which ones not so well, and make quicker decisions and make quicker changes. And AI co-pilots have been rolled out to all sorts of different departments, marketing, finance, sales, and in my department, software engineering, compliance, and risk management. A lot of what we do at either needs to be GXP compliant or socks compliant.
AI enforces continu trails powered by machine learning. In our consumer and customer relations space, we're using AIE detection for adverse events and we're able to see risks before they happen. And finally, personalization and consumer experience. We've moved from a world where we had a one-sizefits-all approach to our consumers to actually giving them a tailored experience which is relevant for them and valuable for them.
And at the heart of this, I know today we're talking about nextgen applications. At the heart of this and at the heart of our integration is our speed platform. This is our services platform for enhanced enterprise digitization. This has four key components. All of which work together to streamline our digital operation. The first one is our API gateway. Our API gateway acts as a single entry point for all external and internal traffic.
It manages authentication, rate limiting, logging and load balancing. It enforces security practices such as oorthth and JWT. It ensures efficient routting to our back-end services in a very very secure way. The second part is our enterprise innovation platform which is our Kubernetes platform where we host containerized applications and services at scale. This provides orchestration, deployment, scaling and life cycle management.
It gives us a DevOps culture with DevOps practices such as CI/CD and GitHops. Everything that we do in Halon is infrastructure as cloud uh infrastructure as code. The next one is our AIM ML platform powered by data bricks and this is very very key. It supports large scale data processing and machine learning workflows. Offers collaborative notebooks for data science and engineers and facilitates model training and MLOps.
And the beauty of it is it integrates very very seamlessly with Delta lakes, data lakes and various BI tools. For the first time we could get access to data that we never had access before in a very very easy and streamlined way. And the last one is CPI cloud platform integration. Haleion is a CPG company. Our ERP system is central to everything that we do. an order any order any invoice any modification all gets registered in our system of record which is SAP uh ERP system CPI connects SAP and nonSAP systems via pre-built and bespoke integration flows it handles message transformation routting and protocol bridging but most importantly is it's API first meaning it connects very seamlessly with the rest of our ecosystem So these are four key components.
Our API gateway for routting, our Kubernetes platform EIP for hosting, our infrastructure at scale, our AI MLP platform powered by data bricks for large scale data processing and machine learning capabilities and CPI which gives us operational efficiencies by bringing a legacy ERP system closer to the to the real world. Speed is central to our digital strategy. It allows us to innovate, grow in a very scalable way. All right.
So most of the organizations um they think of data as an expensive necessity uh rather than something that is useful to them. So lots of organization have lots of trouble when they're trying to access the data and try to use that to drive the insights. Uh but the leading and innovative organizations they think differently. They believe that data is the most strategic asset that they hold uh which grows over time and provides them unlimited possibilities.
Haleon is one of those leading organizations who is leveraging that data and AI ecosystem to unlock number of use cases. But when you are trying to access the data there are number of questions in the mind right for all the enterprises that how can I find where my data is how can my people access that is that reliable and how can I quickly unlock the insight those and many other questions data bricks is helping halon to solve so we are working as a strategic partner with halon to work across different teams we are working with the IT teams creating those data foundations to provide them the capability of things like Unity catalog providing them mosaic AI where they have latest and greatest AI features.
They have access to database SQL serverless warehouses where their analysts can come and use their BI tools and now teams like most software engineering teams who are going and creating um applications and we are also working with across the business as well who now can access data from other parts of the business as well. So if you have global and local data links, you don't need to go and do the same processing in your site.
You can just leverage Unity catalog in and access that in a governed and um performant way. So we are working across those streams uh with Haleion and we'll be talking about in in the coming slides that what we have done um exactly a little bit on the solution architecture side of the things as well. Brilliant. Um so this is the part of the architecture that I wanted to share with you all. Um so in our customer and consumer relations space we had we had our service agents right these guys would respond to tickets complaints queries they used to actually resolve a case or a complaint um each one would take around 26 days to resolve right and the reason why it would take 26 days is because they would log into six seven maybe 10 different systems to be able to get the data they need to resolve solve a simple case.
Now, the problem we had was a lot of our data was already in our data lake, right? So, they didn't necessarily need to log into all these different systems and they also have a single portal where they actually see all their tickets, but it just doesn't have all this information that's available on all the other systems. So we thought actually what if we work with data bricks and supplement the data in our enterprise data lake with real-time data so that actually we can then give out an endpoint that can give our service teams the data they need in one place.
So here's what we did. The raw historical data tables were pushed into enterprise data lake on batch, right? This serves as the foundational layer of our data architecture. This is the historical um push that happens in batch. Then for any changes or any modifications, the delta is pushed via SAP CPI we spoke about before passed through Apogee and our SAP data micros service which is hosted on our enterprise innovation platform into the enterprise data lakeink.
This means that all the latest data is available inside our enterprise data lakeink and it's reflective of all our latest business activity. Um for the order status, order status, there's some internal logic inside SAP which works out order status. So the user calls SAP whenever they need the order status and this again gets saved inside enterprise data lake and we could detect when that's being changed. Datab bricks sits on top of our enterprise data lake in this case.
It does the processing and analyzes the data. It then transforms the data to make it available. And the beauty of it, which is what we've seen in this case, is as our data volumes grow, data bricks just scales without any negative performance impact on the user. Yeah. So yeah, I'll just take this. So um little bit about what exactly Haleyon team did. It's um not oneonone on data bricks SQL, but just want to give you some insight exactly what they were doing.
So um data bricks SQL it um serverless is is a data warehouse on lakehouse I assume everybody knows about it um and it gives you capabilities to connect with your favorite BI tools lots of people do that uh you can also do data processing data engineering which in case of alien they're doing as well and now you can obviously leverage your external applications to connect with data bricks SQL serverless as well which in case of mo they have done that as well And it it opens up lots of different use cases, right?
You can tap into the data which is sitting in your lakehouse and you can have your thirdparty applications go and start um uh talking to that and start creating front-end applications. So um we um obviously there there's like a rich ecosystem of connectivity which data bricks have done lots of investment in um BI tools I've talked about while this is like the most consumed pattern lots of obviously BI tools uh connectivity is already there we are improving it bringing new ones out as well um I want to just focus a little bit on the bottom half right so these set of uh connectivity connectivity tools which are already available to you if you want to connect through JDBC OBC PC you can you can do that as well or if you want a first party integration with python node go you can you can do that as well and now the language agnostic way using the rest api which mo and their team u used so they use that mechanism I'll talk a little bit more about that in the coming slide so that gives you that agnostic way without worrying about what language you're using over http go and connect using the API so if you remember that speed platform is APIdriven right everything needs to work through API So that was like obviously one of the main thing uh main requirement when we we were working with most team that it should connect with API and um so with obviously the spirit to run these SQL um uh queries over HTTP with SQL warehouse and using like external party tools they they want to use that kind of capabilities which which I'm just talking about.
So this SQL statement execution API that runs the SQL on the warehouse over REST. Um so it's just like a HTTP framework right so which allows thirdparty tools to go and connect with SQL warehouse now you can connect custom applications of whatever language you want it can be PHP python uh JavaScript whatever you feel like and because the HTTP is a common denominator for the technology for the uh for the people anything within your organization if you want to integrate with other applications and even user devices you can easily do that using that and also you can use this SQL uh statement API to create your own APIs.
You can wrap them and create your own APIs which can then be adapted for your different use cases and uh consuming microservices as well. So how does that work? It's quite straightforward. Uh you have front-end applications where business users will provide some input u whatever the information they're looking for that will be passed over to uh serverless SQL and there are three endpoints which are provided. uh these uh you can use that and you can send your query over that.
If the result is very quick, the result comes back very quickly. If not, then you get a statement ID and you can go and pull the result later on as well. So this way you can see that you can extract that insight very very quickly using those third party applications. You don't need to install any drivers. You don't your applications don't need to wait for like long connections. They can just fire the query and then go and pull the result later on.
And the best part is that it supports the OOTH authentication like so that the access is governed and in in a secure way. So you're not like exposing anything. So now I'll request more to just show the demo of the application so that you can see how things were working on that. How exciting. We have a demo. Um brilliant. So we've pre-recorded a demo. Um so this is our Salesforce service cloud. So this is our one-stop shop for all our all our agents.
They come in here, they have a look at um they have a look at all the tickets. You'll notice there there was a customer um order history. So that's that's the data that was showing um in that area. Um this is our logging. So you could see that the calls made back um happened in around 2 to 3 seconds. Um so this is essentially coming from uh directly from data bricks. Um so the total call time was 2 to 3 seconds. um and we'll we'll see a breakdown of um of where those uh two to three seconds were spent.
So if you have a look on the on the top right you could see 81% of that time was the processing time in data bricks. So data bricks took about um 81% of the time. Um 12% 12 13% was uh was the was the actual API call um and then 6% was just background um and internal processes. Um and you can see the query parameters at the bottom um which is uh which gets pushed um to uh to tell data bricks what query needs to be run in the background.
Um so totally in terms of non-functional requirements we tend to look at API calls around 300 to 400 milliseconds. Obviously with data bricks um it does add some time. These are the queries that run in in data bricks. Notice the category items and the line items being returned. There's a whole bunch of data it's going through to be able to retrieve this data. So even at 2 3 seconds it's pretty impressive um what's what's happening.
Um, and Wasim has uh has promised us that they're still working to get this uh lower, but let's see let's see how that goes. But for an internal system, that's that's pretty impressive. Um, this is our AP API go gateway. Um, so notice we're we're going to just take the um the X um uh key just so that we can fully track this in our SAP system. Um so I can show you what's going on. I had I wanted to make sure that this is very relevant.
So this is actually our production system. um we don't want to kind of go and show you a a test system, which is why we'd have to gray a lot of the um a lot of our security keys out. So, apologies, but um but you get the idea. So, we're taking the we're taking the um the one of the headers and just so that we could show you. And then this is our SAP screen. Um so, we can see that's the same key that we got from our API gateway.
That's A006 which is our sales order order API um that comes from um our SAP system. Notice it's about 300 milliseconds. So this is the time this is part of that 12 13 seconds that we saw in our logging. Um so this is part of that API key uh API call. Um and then and then notice uh notice all the all the keys there. Um and then at the bottom um if we scroll down um you could see for example that's the uh that's the payload sizes um over there.
So in this case it's uh it's 10 kilo it's 6 and 10 kilobytes but that's essentially returned back um our our order um our order status back to um back to enterprise data lakeink and then we could see the full end to end flow um which is actually pretty good. So actually for our for our internal system um actually getting that data back in 2 seconds um actually worked really really well for us. If you think about how they how they moved from um six, seven, 10 different systems now they've got all the data in one system.
Yes, it takes two seconds but that meant that we were able to reduce our query time responding to queries from 26 days down to about five or six days which is which is pretty impressive. So that's that's what 5x performance, 5x efficiency. Um and then there you can see um at the end of the demo it's uh that the that ticket is completely processed. So um yeah, so yeah. So um yeah, so this is um obviously just just to put some um more thoughts on that the data sets are not small, right?
So I'm sure like you're seeing the quy times coming a couple of seconds and stuff there are like thousands and hundreds and thousands some cases maybe millions of rows as well right so we we have to see like how we can get that efficient performance out normally the data bricks SQL serverless it is packed with lots of optimizations already pre-built and I'm sure like you'll be uh hearing more tomorrow about new stuff new innovations that are coming out lots of uh performance optimizations built in in the system but sometimes when you're working with legacy data legacy tables you you have to apply some kind of uh optimizations so that you can make sure that the performance is optimal.
So in this case we use some combination of techniques and we can we see that lots of our customers use those things as well. For example, we use liquid clustering in in the case which is like a modern data layout um um uh uh capability which allows you to access data more efficiently, partition the data more efficiently. It's incremental clustering. Uh it used binary in the back end so the data stays in the same sizes so you have no data skew.
In some cases you use Zordering as well which is the way to colllocate the data efficient skipping. Uh again when you're accessing uh data in your queries the performance is really fast. Uh we use materialized views as well very commonly used technique when you have aggregated data so that data is pre-agregated for your queries and they go and fetch that and with the power of enzyme it can do incremental refresh so that you don't have to do full computes and that obviously u reduce the time as well to serve the data to the users. uh and in in one of the case we have to use this uh target file size as well.
Uh this this is like advanced optimization uh you can see that if you if like for SQL geeks here if you see in the UI you can see what data skipping is happening and you can adjust this uh if you feel that's not happening properly. So with the combination of these techniques obviously we we have done work with them and reduce the time to serve that and as Mo mentioned we are working with the team to make it even more optimized um and provide better return times.
So again like I think I've talked about this already uh they they find lots of benefit by using this SQL statement API is there was no need to install the drivers API is the way to go for speed platform um and they can do manipulation of the data not only reading it but other DML operations on that one as well and the best thing was they can use oath authentication with asynchronous or synchronous execution modes so which worked really well for the speed platform overall.
So um as we approach the end of our talk today um I wanted to take you through a little bit of our road map to success. Um so the next phase for us will focus on a streaming native AIdriven um experience. So this will how do we harness the true benefits of data and AI um for efficiency and streamlining um all our processes. Um so at the heart of this is a unified data layer. So this is bringing together batch streaming and AI workflows all onto a single platform.
So how do we manage our data in a way where we put analytics and operational data all in one place so we could get a comprehensive view of our entire operation. So that's the first one. The second one is real-time data processing. So streaming uh data ingestion and transformation either with a CFKA or something similar. And this will allow us to start making decisions decisions on the fly. Um next one will be embedding um AI as a core capability um operationalizing machine learning for intelligent experiences enhancing the customer experience and streamlining um all our workflows.
Um so any internal processes um which need it will be able to use it. Um and the last one will be um will be uh making sure that we're a developer first platform. So enabling developers to build data powered apps so that we can innovate and grow um and they'll have access to all their data a lot quicker um than they do at the moment. Um and then we're hoping that this will transform our organization um to one mean that we are fit for the future um but two means we can innovate a lot quicker than we do today grow and scale very seamlessly.
Yeah. And as as data bricks and halen I mentioned before being a strategic partner we are fully supporting halon to achieve that uh mission. So we are on the journey with them. Um we are working with them to make sure that the unified data layer is there powered by unity catalog. We are working with them to um allow them to access the genai capabilities with the mosaic with these model serving endpoints giving them the ability to access open-source or proprietary uh LLMs. they are now looking to use Genie uh to access the structured data within the data lakes because obviously they they have lots of data in the lakes and so they want to access that through Genie and incorporate that in their application through the API interface um and also looking in data bricks apps as well which is like obviously the data apps uh capability you can build those apps on the platform u if u you don't want to leverage the external apps and you can see this is like obviously not the final architecture we're still working with the team uh we are bringing that real uh streaming capability making sure that all the data is available to be used in a governed way. they have the capability as in infrastructure as a code so they don't have to wait for too long to access those capabilities and everything in a governed way compliant way so that they can leverage that without having any challenges and uh as I as it says road map to success right so this is a road map this is a journey and we are fully uh fully supportive of that and part of that with Halen uh so yeah thank you very much for see and thank you all for listening thank you very much everyone thank

Learn more about the Databricks Data and AI platform.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.