Walking through an example of a data product
Let’s work through a simple example that shows how to create a usable data product. This will solidify the ideas we’ve discussed so far in this chapter by applying them in practice.
Imagine we are building an e-commerce website that sells physical products directly to customers. We have many products and often apply discounts on these products as we react quickly to external factors in the market and internal factors such as our stock levels.
The way these discounts have been modeled and applied to orders has changed several times in the database that drives the service behind our e-commerce service. Initially, we added another field to the products
table, but that meant a particular discount could only apply to a specific product, rather than many.
It was then extracted out to a new discounts
table, which provided more flexibility in how we applied discounts across our product lines. However, the data was never backfilled...