Data discovery

Data mapping

Code generation

Code execution

Data review

Data transformation can be divided into the following steps, each applicable as needed based on the complexity of the transformation required.



These steps are often the focus of developers or technical data analysts who may use multiple specialized tools to perform their tasks.


The steps can be described as follows:


Data discovery is the first step in the data transformation process. Typically the data is profiled using profiling tools or sometimes using manually written profiling scripts to better understand the structure and characteristics of the data and decide how it needs to be transformed.


Data mapping is the process of defining how individual fields are mapped, modified, joined, filtered, aggregated etc. to produce the final desired output. Developers or technical data analysts traditionally perform data mapping since they work in the specific technologies to define the transformation rules (e.g. visual ETL tools,[3] transformation languages).


Code generation is the process of generating executable code (e.g. SQL, Python, R, or other executable instructions) that will transform the data based on the desired and defined data mapping rules.[4] Typically, the data transformation technologies generate this code[5] based on the definitions or metadata defined by the developers.


Code execution is the step whereby the generated code is executed against the data to create the desired output. The executed code may be tightly integrated into the transformation tool, or it may require separate steps by the developer to manually execute the generated code.


Data review is the final step in the process, which focuses on ensuring the output data meets the transformation requirements. It is typically the business user or final end-user of the data that performs this step. Any anomalies or errors in the data that are found and communicated back to the developer or data analyst as new requirements to be implemented in the transformation process.[1]

Types of data transformation[edit]

Batch data transformation[edit]

Traditionally, data transformation has been a bulk or batch process,[6] whereby developers write code or implement transformation rules in a data integration tool, and then execute that code or those rules on large volumes of data.[7] This process can follow the linear set of steps as described in the data transformation process above.


Batch data transformation is the cornerstone of virtually all data integration technologies such as data warehousing, data migration and application integration.[1]


When data must be transformed and delivered with low latency, the term "microbatch" is often used.[6] This refers to small batches of data (e.g. a small number of rows or small set of data objects) that can be processed very quickly and delivered to the target system when needed.

Benefits of batch data transformation[edit]

Traditional data transformation processes have served companies well for decades. The various tools and technologies (data profiling, data visualization, data cleansing, data integration etc.) have matured and most (if not all) enterprises transform enormous volumes of data that feed internal and external applications, data warehouses and other data stores.[8]

Limitations of traditional data transformation[edit]

This traditional process also has limitations that hamper its overall efficiency and effectiveness.[1][2][7]


The people who need to use the data (e.g. business users) do not play a direct role in the data transformation process.[9] Typically, users hand over the data transformation task to developers who have the necessary coding or technical skills to define the transformations and execute them on the data.[8]


This process leaves the bulk of the work of defining the required transformations to the developer, which often in turn do not have the same domain knowledge as the business user. The developer interprets the business user requirements and implements the related code/logic. This has the potential of introducing errors into the process (through misinterpreted requirements), and also increases the time to arrive at a solution.[9][10]


This problem has given rise to the need for agility and self-service in data integration (i.e. empowering the user of the data and enabling them to transform the data themselves interactively).[7][10]


There are companies that provide self-service data transformation tools. They are aiming to efficiently analyze, map and transform large volumes of data without the technical knowledge and process complexity that currently exists. While these companies use traditional batch transformation, their tools enable more interactivity for users through visual platforms and easily repeated scripts.[11]


Still, there might be some compatibility issues (e.g. new data sources like IoT may not work correctly with older tools) and compliance limitations due to the difference in data governance, preparation and audit practices.[12]

Interactive data transformation[edit]

Interactive data transformation (IDT)[13] is an emerging capability that allows business analysts and business users the ability to directly interact with large datasets through a visual interface,[9] understand the characteristics of the data (via automated data profiling or visualization), and change or correct the data through simple interactions such as clicking or selecting certain elements of the data.[2]


Although interactive data transformation follows the same data integration process steps as batch data integration, the key difference is that the steps are not necessarily followed in a linear fashion and typically don't require significant technical skills for completion.[14]


There are a number of companies that provide interactive data transformation tools, including Trifacta, Alteryx and Paxata. They are aiming to efficiently analyze, map and transform large volumes of data while at the same time abstracting away some of the technical complexity and processes which take place under the hood.


Interactive data transformation solutions provide an integrated visual interface that combines the previously disparate steps of data analysis, data mapping and code generation/execution and data inspection.[8] That is, if changes are made at one step (like for example renaming), the software automatically updates the preceding or following steps accordingly. Interfaces for interactive data transformation incorporate visualizations to show the user patterns and anomalies in the data so they can identify erroneous or outlying values.[9]


Once they've finished transforming the data, the system can generate executable code/logic, which can be executed or applied to subsequent similar data sets.


By removing the developer from the process, interactive data transformation systems shorten the time needed to prepare and transform the data, eliminate costly errors in interpretation of user requirements and empower business users and analysts to control their data and interact with it as needed.[10]

- one of the oldest and popular textual data transformation language;

AWK

- a high-level language with both procedural and object-oriented syntax capable of powerful operations on binary or text data.

Perl

- specialized to transform data into documents (see also template processor);

Template languages

- prototyping language-based descriptions, used for source code or data transformation.

TXL

- the standard XML data transformation language (suitable by XQuery in many applications);

XSLT

There are numerous languages available for performing data transformation. Many transformation languages require a grammar to be provided. In many cases, the grammar is structured using something closely resembling Backus–Naur form (BNF). There are numerous languages available for such purposes varying in their accessibility (cost) and general usefulness.[15] Examples of such languages include:


Additionally, companies such as Trifacta and Paxata have developed domain-specific transformational languages (DSL) for servicing and transforming datasets. The development of domain-specific languages has been linked to increased productivity and accessibility for non-technical users.[16] Trifacta's “Wrangle” is an example of such a domain specific language.[17]


Another advantage of the recent domain-specific transformational languages trend is that a domain-specific transformational language can abstract the underlying execution of the logic defined in the domain-specific transformational language. They can also utilize that same logic in various processing engines, such as Spark, MapReduce, and Dataflow. In other words, with a domain-specific transformational language, the transformation language is not tied to the underlying engine.[17]


Although transformational languages are typically best suited for transformation, something as simple as regular expressions can be used to achieve useful transformation. A text editor like vim, emacs or TextPad supports the use of regular expressions with arguments. This would allow all instances of a particular pattern to be replaced with another pattern using parts of the original pattern. For example:


could both be transformed into a more compact form like:


In other words, all instances of a function invocation of foo with three arguments, followed by a function invocation with two arguments would be replaced with a single function invocation using some or all of the original set of arguments.


Another advantage to using regular expressions is that they will not fail the null transform test. That is, using your transformational language of choice, run a sample program through a transformation that doesn't perform any transformations. Many transformational languages will fail this test.

Data cleansing

Data mapping

Data integration

Data preparation

Data wrangling

Extract, transform, load

Information integration

a related Wikiversity article

File Formats, Transformation, and Migration

at Curlie

Extraction and Transformation