<?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 Ben Watson on Medium]]></title>
        <description><![CDATA[Stories by Ben Watson on Medium]]></description>
        <link>https://medium.com/@ben.watson_9108?source=rss-718e1db5b43f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PBtpcM4qbmSoKtsdoZiTNw.png</url>
            <title>Stories by Ben Watson on Medium</title>
            <link>https://medium.com/@ben.watson_9108?source=rss-718e1db5b43f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 16:08:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ben.watson_9108/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[Running a Modern Data Platform at Nando’s — Part 2/2 — Data Mesh and Data Contracts]]></title>
            <link>https://medium.nandos.dev/running-a-modern-data-platform-at-nandos-part-2-2-data-mesh-and-data-contracts-1d1937b6cac6?source=rss-718e1db5b43f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d1937b6cac6</guid>
            <category><![CDATA[data-mesh-implementation]]></category>
            <category><![CDATA[data-mesh]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[data-contract]]></category>
            <dc:creator><![CDATA[Ben Watson]]></dc:creator>
            <pubDate>Wed, 16 Oct 2024 14:23:04 GMT</pubDate>
            <atom:updated>2024-10-24T12:18:15.160Z</atom:updated>
            <content:encoded><![CDATA[<h3>Running a Modern Data Platform at Nando’s — Part 2/2 — Data Mesh and Data Contracts</h3><p>Nando’s data landscape looked quite different before the modern version of Nando’s data team started in early 2021. Different teams maintained their own copies of data, and several siloed attempts at data platforms had been made across different clouds.</p><p>With the creation of a single data team came the goal of curating and managing a single source of truth for data within Nando’s. Giving this responsibility to a single team made it easier to get up and running — there was no need to coordinate data across domain teams or to require other teams to learn data engineering skills. Teams were simply told to give all of their data to the data team who would then take care of cleaning, documenting, transforming, analysing and exposing it.</p><p>This was initially great fun for us in the data team — we could measure our success on how many datasets we owned, how much data we were ingesting and how many questions we were getting about data. We wanted all of Nando’s data and we wanted it as raw as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sao8rhNvA-oq0e3NMTEkYA.png" /><figcaption>Nando’s central data team having the time of their lives as the owner of all data</figcaption></figure><p>This model enabled us to quickly pull together Nando’s core datasets such as sales, restaurant metadata and opening hours, and expose them in Looker for downstream consumption. See <a href="https://medium.nandos.dev/running-a-modern-data-platform-at-nandos-part-1-2-overview-6b66ccd35350">part 1 of this blog post</a> for more information.</p><p>Of course we quickly found that this model has its limitations. It’s not easy for one team to take on the responsibility of understanding and answering questions about all data in a company — from stock to sales, labour to forecasts, smart fridge sensors to customer loyalty. Some domain teams built pipelines within the data team’s platform, but they found themselves limited around additional requirements such as specific test pipelines or more complex scheduling.</p><p>We quickly realised that it would make more sense for domain teams to own their own data. With data under their control they could build data-driven applications from the start, have more control over their platform, and the data would stay in the hands of the people who best understand it.</p><p>Achieving this while still maintaining an overall single data strategy is known as Data Mesh, best documented <a href="https://www.datamesh-architecture.com/">here</a>. The rest of this post will discuss how we implemented this at Nando’s.</p><h3>Data Mesh Implementation</h3><p>There are many companies out there who make tools that will manage a data mesh or catalogue data, including Mode, Atlan, Google Cloud Dataplex and Databricks. Typically these tools work by scanning for data across buckets and tables in clouds as well as providing UIs for discussing and managing data.</p><p>Nando’s generally prefers to build its own tools, and as such we instead opted for an alternative approach centred around Dataform and BigQuery. All tech teams within Nando’s use Google Cloud, so centring our data strategy around these technologies gives us consistency and makes it easier to track data.</p><p>As such we decided to bundle Google’s data transformation tool Dataform and the surrounding tools that we’d built around it (CI/CD, test pipelines, auditing, alerting etc) into an easily-deployable Data Pond as a Product. By encouraging domain teams to transform their data using these tools we’re able to enforce consistency, and we can easily track who is consuming data.</p><p>Teams build pipelines to ingest their raw data into BigQuery within their own GCP projects, transform the data using Dataform and expose it through Looker or via custom export pipelines such as CSV exports or APIs as required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*WTm2A2PXyJWdkwPasiXNIw.png" /><figcaption>Nando’s Data Pond as a Product — an ecosystem of tools around BigQuery and Dataform to allow other domain teams to transform and share their own data</figcaption></figure><h3>Data Contracts</h3><p>We often get questions like “which tables do we share with external company X?” or “if I change this table then who will be impacted?”. Being able to quickly answer these questions and have confidence that this information is up-to-date is important for maintaining a stable data platform that can iterate quickly without constantly breaking hidden dependencies on other teams.</p><p>As such we created a Data Contract Service to track the consumption of BigQuery tables both within our data mesh and externally.</p><p>Automating this contract detection and change process is vital for ensuring contracts remain fresh (and ultimately useful). We had in the past attempted to maintain a manual log of data consumers but despite best efforts found this to be almost always stale, especially once other teams started generating and sharing their own data.</p><p>Nando’s Data Contract Service is centred around Dataform and can track two types of contract:</p><p><strong>External Contracts: </strong>Tables that are shared outside of Dataform — for example a table that generates VAT receipts used by an internal application. These must be manually tagged in the Dataform config block. The GitHub Actions CI/CD pipeline identifies any external_dependencies labels and tracks such contracts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*YD2XgwpYEDkSkRivB57t_g.png" /><figcaption>An example of an external dependency to be tracked by the Data Contract Service — in this case this table is consumed by Nando’s VAT Receipt app</figcaption></figure><p><strong>Cross-Pond Contracts: </strong>Tables shared with other ponds’ Dataforms. These are declared like any other declaration in Dataform but must be placed within a cross_project directory. The GitHub Actions CI/CD pipeline automatically tracks contracts for any such declaration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*u_zXdHvPJt5EvhfZ8IZxkA.png" /><figcaption>A cross-pond contract — declarations in the cross_project folder are automatically tracked by the Data Contract Service</figcaption></figure><p>Contracts themselves are stored in Firestore, interfaced via a CRUD API. Each time a table managed by a contract will be changed by a Pull Request then the developer must manually acknowledge that their change will affect another team via a GitHub Issue. A Slack notification pings the affected teams following the PR’s merge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0C4Awq83mN2UhK_oalQAHw.png" /><figcaption>The architecture for managing Data Contracts within our CI/CD pipeline</figcaption></figure><h3>A Word on Data Culture</h3><p>Running a successful data platform requires more than just technical work and as such much of our effort is culture-focused. We’re acutely aware that if we can’t deliver accurate, timely data and give teams power over their data then teams will revert to working on their own data independently. At this point numbers start to disagree across different spreadsheets in different departments, it becomes harder for teams to share data with each other, and the data team loses its purpose. As such we’ve put a lot of effort into building and maintaining a strong data culture within Nando’s. This has included:</p><ol><li>Creating a company-wide #data-community Slack channel with over 300 members ranging from restaurant staff to board-level executives. All questions are welcome and a rota of analysts ensures that someone’s always on hand to help. Having a single place to ask all data questions helps to promote activity and spawns great cross-functional discussions, often in turn shaping future projects and encouraging collaboration across teams that typically might not work together. It’s not uncommon to see discussions such as the head of ops and a restaurant assistant manager discussing the minutiae of delivery rider wait times.</li><li>Initially rolling out data ponds to domain teams who wanted them. Some teams were unable to do what they wanted in the pre-data mesh single data pond and so were eager to run their own. It was therefore easy to engage with these teams and build ponds with them. Once the success of these ponds was proven then we were able to demonstrate their usefulness to other teams. A community of data engineers was created in Slack for people to share data-related articles and discuss data engineering and analysis.</li><li>Identifying data champions across the business and working with them to get their teams thinking about data and up-skilling their own colleagues. This massively reduces load on the central data team as many questions are answered without our involvement.</li><li>Purposefully organising content in Looker. Looker’s permissions models are used to grant access to dashboards based on roles, meaning we’re able to deliver dashboards targeted to restaurants, operations specialists and regional managers separately. Avoiding overwhelming users with data is important in ensuring that everyone can see the data that they need.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d1937b6cac6" width="1" height="1" alt=""><hr><p><a href="https://medium.nandos.dev/running-a-modern-data-platform-at-nandos-part-2-2-data-mesh-and-data-contracts-1d1937b6cac6">Running a Modern Data Platform at Nando’s — Part 2/2 — Data Mesh and Data Contracts</a> was originally published in <a href="https://medium.nandos.dev/">Nando’s Product and Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running a Modern Data Platform at Nando’s — Part 1/2— Overview]]></title>
            <link>https://medium.nandos.dev/running-a-modern-data-platform-at-nandos-part-1-2-overview-6b66ccd35350?source=rss-718e1db5b43f------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b66ccd35350</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[dataform]]></category>
            <category><![CDATA[looker]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Ben Watson]]></dc:creator>
            <pubDate>Fri, 16 Aug 2024 10:58:08 GMT</pubDate>
            <atom:updated>2024-10-03T19:36:18.490Z</atom:updated>
            <content:encoded><![CDATA[<h3>Running a Modern Data Platform at Nando’s — Part 1/2— Overview</h3><p>Data is central to Nando’s goals. We understand that providing accurate, timely and actionable insights and making them widely available can help the business better understand, and answer, our core business challenges.</p><p>As a modern, tech-centric restaurant chain we consume data from over fifty different sources in a wide variety of formats. These include:</p><ul><li>Sales data from our tills, our in-house ordering platform and Deliveroo,</li><li>Sustainability data such as oil recycling, chicken donations and waste collections,</li><li>Kitchen data such as live feeds from our smart ovens and kitchen display systems,</li><li>Customer loyalty information.</li></ul><p>This data is exposed to a variety of consumers both internal and external to Nando’s. Most of our data is consumed through <a href="https://cloud.google.com/looker">Looker</a> dashboards which are viewed by Nandocas (staff) across the business — including restaurants — and provide critical information required to keep restaurants running efficiently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hA0Cnn8j4MJ0m70578mG_w.png" /><figcaption>One of our restaurant-facing Looker dashboards, giving at-a-glance sales figures. Sample figures are used</figcaption></figure><p>To ensure that users can get the relevant value from our data then we need to clean, join and transform the previous day’s data before 8am each morning, to help Nandocas plan for the upcoming day. Whilst it would be nice to operate on a real-time basis, it’s not always possible due to the late arrival of some external data sources.</p><p>It’s important that we meet this deadline without requiring data engineers to set their alarm clocks for 4am each morning and without being overwhelmed by a sea of alerts. We also want domain teams to be able to own their own data rather than data being the responsibility of a central team.</p><p>In these two blog posts we’ll look at how we manage this, with a focus on our transformation layer (<a href="https://cloud.google.com/dataform/docs/overview">Google Cloud Dataform</a>) and our <a href="https://www.datamesh-architecture.com/">Data Mesh</a> architecture.</p><h3>Nando’s Data Platform</h3><p>At Nando’s our architecture is centred around a data mesh model using Google Cloud, in which each domain team owns their own data. Each team manages their own GCP project containing raw data in BigQuery that’s then transformed into reporting tables via Dataform. We call each of these Data Ponds, and together they all form the single Nando’s Data Lake.</p><p>We chose Google Cloud for two main reasons:</p><ol><li>It’s Nando’s primary cloud service; it’s easier to wrangle data when it all exists in the same cloud.</li><li>BigQuery’s on-demand scaling and pay-as-you-go model allows us to meet our demands around:<br>a. Spiky workloads — some projects will query as much as 5TB of data across 500 SQL transformations in ten minutes during morning Datform schedule runs. We need these to run as quickly as possible and scale back down without charging us for that capacity permanently.<br>b. Consistently high usage through Looker — Looker runs millions of queries a month and so much be able to build and display complex dashboards in seconds.<br>c. Strong analytics capabilities with machine learning and AI baked directly into BigQuery.</li></ol><p>The rest of this post goes into each of the below sections in more detail:</p><ol><li>Domain teams ingest raw data into their own GCP project’s BigQuery with as little transformation as possible.</li><li>Each domain team cleans, transforms and joins the data using Dataform (again inside their own GCP project).</li><li>Data is shared and exposed as necessary, both with other domain teams’ ponds and elsewhere (such as Looker, Nando’s applications, BI tools and Vertex AI notebooks). Nando’s Data Contract Service supports the sharing of data.</li></ol><p>A core data &amp; analysis team are responsible for providing tooling to enable domain teams to run their own data ponds, defining data governance, owning Looker, and processing core datasets such as financial data, opening hours and restaurant master data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lvLHzX0H7hrZ3swvtDDZfQ.png" /><figcaption>Nando’s data mesh architecture</figcaption></figure><h3>Extract and Load</h3><p>We ingest data into Google Cloud BigQuery as soon as it’s available, preferring to use built-in GCP tools where possible as they tend to be more cost efficient. It’s in Google’s advantage to make it easy for users to easily ingest data into BigQuery and for most data sources this is relatively straightforward. For more complex data sources we write our own Cloud Functions to ingest data, and we use <a href="https://www.fivetran.com/">Fivetran</a> for our most complex datasets such as Stripe and Zendesk.</p><p>Generally we expect little of our raw data — our goal is simply to get it into BigQuery in whatever state it arrives. For example when receiving JSON webhooks we dump the entire unparsed JSON message into a single string or JSON column named data. In the event of the schema unexpectedly changing then we still ingest the data without issues and can clean it via SQL. Identifying what’s wrong with data and cleaning it is much easier if the data is already in BigQuery than if it’s in Parquet files in another company’s S3 bucket.</p><h3>Transformation: Dataform</h3><p>Imposing such loose standards on raw data means that we expect a lot of our transformed data. It must be clean, have a consistent schema and be fresh by a certain time. We do this using <a href="https://cloud.google.com/dataform">Dataform</a>, a Google Cloud tool that allows transformations to be run on BigQuery in the form of SQLX files.</p><blockquote>Dataform is a service for data analysts to develop, test, version control, and schedule complex SQL workflows for data transformation in BigQuery.</blockquote><blockquote>Dataform lets you manage data transformation in the Extraction, Loading, and Transformation (ELT) process for data integration. After raw data is extracted from source systems and loaded into BigQuery, Dataform helps you to transform it into a well-defined, tested, and documented suite of data tables.</blockquote><p>Each transformation is a SQL query that when executed writes itself to a BigQuery table (or view). Metadata at the top of each file helps with organising, documenting, testing and scheduling these queries:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iXiO66Flfk01KC6mcJ488g.png" /><figcaption>A SQLX file — note the JavaScript injection in place of table references</figcaption></figure><p>Dataform uses JavaScript injections to identify the dependencies between each transformation and builds a DAG:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VnaiwBDh44Zd-t2ZCdtsag.png" /><figcaption>The Dataform DAG representing the various transformations used to transform stock data at Nando’s. Teal boxes are declarations (telling Dataform where raw BigQuery tables live), purple is a transformation that creates a view, blue creates a table and yellow an assertion.</figcaption></figure><p>Each transformation is tagged and these tags are run as schedules. Tests (also written in SQL) run alongside transformations, ranging from basic freshness and unique key checks to more complex logic (such as checking that each open restaurant served a reasonable number of orders each day). The transformations and config are stored in a Git repo to which Dataform provides an abstraction, allowing users to work on branches.</p><p>We chose Dataform for several reasons including:</p><ul><li>It allows us to declare all of our transformations using only SQL and all in one place,</li><li>Its APIs are (relatively) easy to use and Dataform sticks to its goal of transforming data without trying to impose itself as an all-round data management tool,</li><li>It’s free — the only costs incurred are those generated by BigQuery itself when running queries,</li><li>Data analysts pick it up quickly and can start working within a Git repo even if they’ve never done so before. Likewise software engineers without prior data engineering experience can also easily get involved.</li></ul><p>We run multiple Dataform projects — several domain teams run their own and the core data and analysis team processes all other data (including sales data) on theirs. All are tied together in a mesh model (more on that in part two), ensuring consistency and enabling the safe sharing of data. Our largest Dataform schedule runs over 500 transformations and we have over 1000 transformations in total across our ponds.</p><h3>Exposing Data</h3><p>As mentioned, data is shared at Nando’s in a variety of ways. Transformed data in BigQuery can be safely shared across Dataform instances with the help of an in-house Data Contract Service (more on that in part two), allowing tech domains to own and share their own data.</p><p>Some data is built into CSV reports (using Looker’s scheduling where possible), and changes in some datasets are streamed to live services using the reverse ETL tool <a href="https://hightouch.com/platform/reverse-etl">Hightouch</a>. We also use <a href="https://cloud.google.com/vertex-ai-notebooks">Vertex AI</a> notebooks to allow analysts to write ad-hoc reports and perform exploratory data science.</p><p>The semantic layer in Looker allows users to quickly and easily analyse our data, and domain champions across the business help to drive the use of data across Nando’s. This was a key step to ensuring the success and adoption of our data platform. A data team is unlikely to succeed if they isolate themselves and hand down decrees on how others should use data; collaboration and buy-in are essential.</p><h3>Summary</h3><p>In this post we’ve looked at Nando’s general data architecture: ingesting raw data into BigQuery, transforming it in Dataform and providing access to a single source of accurate, fresh data through Looker and other services. In part 2 we’ll look at our data mesh architecture and Nando’s Data Contract Service, and see how they enable domain teams to own their own data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b66ccd35350" width="1" height="1" alt=""><hr><p><a href="https://medium.nandos.dev/running-a-modern-data-platform-at-nandos-part-1-2-overview-6b66ccd35350">Running a Modern Data Platform at Nando’s — Part 1/2— Overview</a> was originally published in <a href="https://medium.nandos.dev/">Nando’s Product and Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>