Extract Transform and Load Overview
Tags: design, tutorial, programming, architecture
Published: 2019-06-14 13:24:14

<h2 class="subhead">Part 1 of the Data Ingest Series</h2>
<p>The process of extract transforms and load (ETL) goes by many names:</p>
<ul>
<li>Data acquisition</li>
<li>Data Ingest</li>
<li>Enterprise transform and load</li>
</ul>
<p>But they all are about getting external data into the system.</p>
<p>The problem that most businesses face is that there are no easy to follow best practices that can guide them in creating ETL pipelines. In this 6-part series, I will address this gap by laying out a simple and flexible set of best practices for creating or evaluating an ETL system.</p>
![](https://thepracticaldev.s3.amazonaws.com/i/rpihnun1xb5xiph0tkbv.jpg)
<h2>The importance of good quality data</h2>
<p>First let’s discuss why ETL is important to the business. Data is frequently the most important asset in any business. In the information age it’s easy to see why. Let look at these examples:</p>
<ul>
<li>Amazon captures buyer data to suggest new items to purchase.</li>
<li>Facebook tracks user data to use and sell for targeted marketing.</li>
<li>Google uses user search history to display google ads.</li>
<li>The music industry exchanges data in order to sell music, pay royalties, and exchange rights.</li>
<li>Governments ingest data for threat assessment in order to enhance national security.</li>
</ul>
<p>The list goes on and on...</p>
<p>So how we handle these data sources and the quality of these data sources are high import for sales, governance, commerce, and in some cases life and death decision making.</p>
<h2>Buy vs. build</h2>
<p>This subject is deserving of its own blog article and can actually be quite controversial during the due diligence phase. I’m only going to briefly touch on the subject here in this series.</p>
<h3>What are some of the criteria when evaluating a COTS ETL platform?</h3>
<p>The common criteria when evaluating building something custom or buying Commercial off the Shelf (COTS) platforms are:</p>
<ul>
<li><strong>Price.</strong> How much license? How much is the cost of building from scratch? Are their maintenance contracts? Will I need to send my employee’s to external training? Will I need a third-party consultant on staff? What are the hosting costs?</li>
<li><strong>Maintenance. </strong>How difficult is it to upgrade? Are there solid upgrade paths? Where will I host the application? Is this a stand-alone/hosted install? Or can I deploy into the supporting app.</li>
<li><strong>Speed of ingest.</strong>  How quickly do I need to process data? Custom built solutions are often much faster that COTS products.</li>
<li><strong>Use Case</strong>. Will this application be used on one project or across the entire organization? (Be honest with this one. I’ve worked with countless COTS products bought and installed for a particular project where the organization says “Lets beta test this million-dollar product on one project and if it works, let's implement it to the rest of the organization”. Only they never do and now they are stuck with a very expensive license).</li>
<li><strong>Governance.</strong> Do I need to maintain a separate set of users and roles? Can I limit who can access my data pipelines</li>
<li><strong>Flexibility.</strong> How easy is it to add new input data types. Can I change the process flow?</li>
<li><strong>Who will be developing it?</strong> A feature of COTS products is they often claim workflows (pipelines) can be created and managed by business users. This often requires special training of business users and a particular type of business user to maintain this. Sometimes companies will use an existing developer to work on the pipeline anyway.</li>
</ul>
<p>There are many great products out there that will give flexible pipelines with the kitchen sink when building your data pipeline. This seems great! Buy a license, install, create a pipeline and let’s go! However, consider the hidden costs in this approach.</p>
<h2>Components</h2>
<p>The majority of data pipelines can be boiled down to 6 main components. Some of these components can be reordered, others may be optional in a particular use case. However, understanding and fully considering each of the components is the key to ensuring data quality and pipeline reusability.</p>
<h3>Submission Information Package (SIP)</h3>
![](https://thepracticaldev.s3.amazonaws.com/i/x7oc0g5ch5q8p2ftm3aa.png)
<p>Submission information package is the first step in any data pipeline. It is the data itself and how the data will get into the system, also known as raw data and data endpoints.</p>
<p>Raw data is the data files being submitted or ingested by the system. This could be multiple formats from multiple submitters. The questions to ask are</p>
<ul>
<li>What data types are we ingesting (Excel, XML, JSON) and are there any particular standards used in the industry (Industry SOPS, Schemas, XSD, format best practices)</li>
<li>Do we need to create a standard? Or do we need to simplify an existing standard?</li>
<li>Who will be submitting the data? Will it be from one partner or can multiple partners submit the same data types.</li>
</ul>
<p>The endpoints discuss how the system gets the data. The questions to ask are</p>
<ul>
<li>Will partners be submitting data to us (Push)?</li>
<li>Or will we need to get the data from the partners (Pull)?</li>
</ul>
<p><a href="https://tenmilesquare.com/extract-transform-and-load-part-2-submission-information-packages-and-high-level-validation/">SIPs and High-level validation will be discussed in depth in from Part 2 of this series.</a></p>
<h3>High-level validation</h3>
![](https://thepracticaldev.s3.amazonaws.com/i/0a3adrh4qumtszozq2am.png)
<p>High-level validation is the second step of any ETL process. High-Level validation is mainly concerned with ensuring that the data format being ingested is actually a format that the system knows how to ingest. For example, it checks that an XML file conforms to the schema, or that the CSV/Excel file has the correct columns. It is not concerned with details of the data like does the book have a title. Does the user have at least one account, etc.</p>
<p><a href="https://tenmilesquare.com/extract-transform-and-load-part-2-submission-information-packages-and-high-level-validation/">SIPS and High-level validation will be discussed in-depth in Part 2 of this series.</a></p>
<h3>Canonical Transform</h3>
![](https://thepracticaldev.s3.amazonaws.com/i/hkyv99va5jm0fmznqnbq.jpg)
<p>This is the third step in any ETL process. The canonical transform is actually composed of 2 pieces. The canonical domain and the data mapping process.</p>
<p>The canonical form is a set of simple objects that all data formats can be mapped to. Often times the canonical will take the form of target database tables or the most complicated or standardized input data format. Industry data standards, like OMOP in healthcare, also represent canonical data models.</p>
<p>The data mapping process is the actual process of converting data from the input formats into the canonical.  For example, taking a book title from a CSV file and putting it in the title field of the Book canonical object.</p>
<p>This step is important to the process because it allows for downstream processing to become reusable and easy to maintain.</p>
<p><a href="https://tenmilesquare.com/reusability-and-sustainability-using-a-canonical-enterprise-transform-and-load-part-3/">Canonical Transform will be discussed in-depth in Part 3 of this series.</a></p>
<h3>Business Rules</h3>
![](https://thepracticaldev.s3.amazonaws.com/i/an0vbltf9barkjvz88x9.jpg)
<p>The fourth step uses the canonical from step 3 and applies detailed validation rules against the data. These rules are important to keep database integrity. These could be simple validations such as all books must have a title or more complex rules such as that a book ownership shares total to 100%. Complex business rules usually focus on data relationships or aggregated data.</p>
<p>Business Rules may also focus on rules that are important to the organization. Data standards are often designed to be flexible across many use cases, however, your organization may only care about a particular aspect of the data standard.  Business rules are how the system will filter out the needed data and the unneeded data.</p>
<p><a href="https://tenmilesquare.com/business-rules-extract-transform-and-load-part-4/">Business Rules will be discussed in-depth in Part 4 of this series.</a></p>
<h3>Identification</h3>
![](https://thepracticaldev.s3.amazonaws.com/i/mgxeo578e4iod2blnp99.png)
<p>The identification step is the fifth step in the ETL process. The identification step is how the system will reconcile new data with previously ingested data. This process will involve key identifiers to compare the data against our known data set (database, index, NO-SQL, external system, etc.). If a match (the data was identified) was found then this step may resolve how data is merged. This means if the data is known and there is a difference between the data store and incoming data how is it reconciled. Some uses case will require the data merging to happen in the persistence layer. This decision will ultimately be based on the business rules and the system’s requirements.</p>
<p>Depending on the needs of the business and the type of data being ingested, this step may need to be skipped. Also, in some use cases it is important to identify the data before running the business rules as the business rules may vary based on if the data is known (identified) or new (unidentified).</p>
<p>The identification step is discussed in-depth in part 5 of this series.</p>
<h3>Persistence</h3>
![](https://thepracticaldev.s3.amazonaws.com/i/kpbqolhz8i5my669znzr.png)
<p>This is the sixth step in the data ingest process. It focuses on storing the data in our datastores for downstream use or for future data identification</p>
<p>Persistence is discussed in-depth in part 5 of this series.</p>
<h3>Audit/Governance/Work Queue</h3>
![](https://thepracticaldev.s3.amazonaws.com/i/w6pm5iqex6pnt2uuojl9.jpg)
<p>The audit, governance, and work queue components are not steps in the overall ingest process but are important, but optional, components of an ETL system. These are the ‘kitchen sink’ features found in most COTS products. The way the data ingest pipelines are used and managed will ultimately determine if any of these 3 components need to be implemented.</p>
<h4>Audit</h4>
<p>The audit component is multi-faceted and covers many areas important to:</p>
<ul>
<li><strong>Data provenance:</strong> Knowing the source of data stored in the data store</li>
<li><strong>Business intelligence:</strong> This is buzz term for analytic about the pipeline and the data streaming through. It answers questions such as
<ul>
<li>How much data is being ingested from a given source?</li>
<li>How long are each of these steps taking to process?</li>
<li>Where in process does data fail?</li>
<li>Where are our bottlenecks?</li>
<li>How many records are being created from each submission?</li>
</ul>
</li>
<li><strong>Decision Audit:</strong> Why decisions about the data were made.
<ul>
<li>Why a record was identified?</li>
<li>Why a data file did not pass a business rule?</li>
<li>Why was a record persistence?</li>
</ul>
</li>
</ul>
<h4>Governance</h4>
<p>Governance covers who can access, run, and report on our data ingest pipeline? And who can change our data pipeline?</p>
<h4>Work Queue</h4>
<p>The work queue component is not a component that is often seen on many ingest system, but given the type of data being ingested it can greatly improve data quality, data transparency, and data throughput.</p>
<p>The Audit, Governance, and work queue pieces will be discussed in part 6 of this series.</p>
<h2>Summary</h2>
<p>The importance of data acquisition in a system is undeniably important and the quality of the data, ultimately determines the quality of the system. With these 6 basic components just about any data ingest pipeline can be designed and implemented with an assurance of data quality and pipeline reusability. In the next segment of this series we will be discussing the Submission Information Package</p>