Data Transformation in Practice: 3 Real-World Data Transformation Examples
Data transformation is a buzzword you hear frequently in the age of big data (even though data transformation’s significance is not limited just to big data). And while it’s easy to define data transformation at a high level, understanding what data transformation means in practice can be trickier. If you’ve found yourself pondering what data transformation examples look like, keep reading for some real-world situations in which data needs to be transformed, and what the transformation requires.
What is data transformation?
As the term implies, data transformation means taking data stored in one format and converting it to another.
As a computer end-user, you probably perform basic data transformations on a routine basis. When you convert a Microsoft Word file to a PDF, for example, you are transforming data.
But data transformation plays a more important and sophisticated role in big data analytics. That is because when you are dealing with large volumes of data, different types of data analytics tools and different data storage systems, you are likely to encounter situations where a large amount of data needs to be transformed from one format to another.
So, that’s the high-level definition of data transformation. To illustrate the concept more precisely, let’s take a look at some real-world examples of data transformation.
Read our eBook
Multiple data types and formats is one of the many challenges to data integration. Walk through the four steps of building a modern data architecture that’s cost-effective, secure, and future proof.
Character encoding and data transformation
Character encoding problems are a common reason for data transformation. To understand why, you first have to understand the point of character encoding.
Character encoding lets computers represent individual letters (or other characters) based on codes. In other words, every letter in the alphabet (as well as other text symbols, such as commas or periods) has can be represented as a code. As long as your computer knows which particular code was used to represent letters in a given set of data, it can decode the data in order to translate it into letters and numbers and print them on your screen.
The problem that often arises out of character encoding is that sometimes, one application encodes characters using one type of encoding scheme, then sends that information to another application that uses a different encoding scheme by default. When the second application tries to open the data, it may not be able to interpret all of the characters.
If you have ever opened a file and found that some of the letters or numbers inside text are represented as gibberish or seemingly random symbols, there is a decent chance than character encoding inconsistency is the reason.
Today, most computers following the UTF-8 encoding scheme, or a newer scheme that is backwards-compatible with it, in order to prevent encoding issues. But it still happens that an application encodes data in a way that other applications or computers do not expect. In these cases, the data would need to be transformed from one type of character encoding format to another.
CSV to XML data transformation
CSV (short for comma-separated values) and XML (or extensible markup language) are two popular ways of storing data today. But they work quite differently.
In a CSV file, you use commas to distinguish different data values from each other. In XML, you primarily represent data using tags that define different units of data and their values. Both types of files also make it possible to represent data hierarchies, but they do so in different ways.
Because CSV and XML work so differently, an application that was designed to read and write data in CSV format can’t typically open an XML file, and vice-versa.
This is where data transformation comes in. Using a data transformation tool, you can automatically convert data from a CSV file into XML format so that you can open it with the right tools.
Speech-to-text and data transformation
A third data transformation example – and one that highlights just how broadly you should think about data transformation – is a situation in which you have human speech that is stored in an audio file, but want to translate that information into a text file.
While you could technically open an audio file as a text file (by, for example, running a command like “cat myfile.wav” in your terminal on Linux or macOS), the audio file would not make much sense when opened this way. It would be a bunch of gibberish.
To make the audio data actually usable to humans who can’t listen to it – or to transform it into a format that allows it to be parsed automatically by an application that reads text – you would want to transform the speech in the audio file into a text file.
You could do this manually by listening to the audio and transcribing the speech in it. Or you could use a speech-to-text tool to automate the process. If you were transforming data on a large scale, you would want to take the automatic approach.
This example might not be one of the first to come to mind when data transformation specialists think of data transformation examples, because it involves more than dealing with data formatting differences. But it is an example of data transformation in a broad sense. It’s also a scenario that you may well face if, for example, you record phone calls with customers and want a way of making data from the conversations available for parsing by tools that can only interpret textual information.
Integrating multiple data types and formats is one of the many challenges of connecting legacy data to next-gen platforms. See how you can overcome these common challenges, read our eBook: How to Build a Modern Data Architecture with Legacy Data