Skip to main content

Today’s businesses run on data. The challenge, however, is ensuring that the data is in the right form so it can be turned into business intelligence (BI) reports, data-driven strategies,  comprehensive analytics, AI, machine learnings and other insights that executives use to make informed decisions.

Each data store or data warehouse stores information in its own way, which can make consolidated reporting difficult. ETL can help.

ETL is shorthand for extract, transform and load—three database functions combined in one tool. As more companies strive to use the information from their data in more meaningful ways, ETL is the answer.

Once the ETL process is established, testing should be performed to validate whether the process has been executed accurately and whether complete and correct data has been moved to the destination in the desired format.

Due to the following factors, testing the ETL process is not as simple as testing a typical web or mobile application:

  • Quick test results are required since source data is not always available for testing
  • Extra efforts are needed to understand the data mapping of each column in all the tables
  • Understanding complex data dimensions and attributes can be challenging
  • Data coming from different sources with varied formats and structures must be verified and validated
  • Huge amounts of data need to be validated
  • Complete test coverage is time-consuming

To overcome these issues, automated ETL testing can gauge the ETL process swiftly and effectively across multiple databases and flat files.

Before data validation starts, a schema-level validation between the source and the target database is performed to check whether the database schema is designed as expected. Once the schema is validated, actual data validation is passed through the following stages:

Stage 1: Data sources like flat files (XML, JSON, CSV, fixed width) and the database(s) are validated for their correctness in terms of the header/footer/sequencing information. Only data that passes validation makes it into a temporary database.

Stage 2: Validation is performed between the data source and the staging database to test whether the data from various sources has been moved correctly with the correct schema. At every stage, the mapping file plays an important role.

Stage 3: Validation is done between the staging database and the transformed target database, validating whether the transformation rules have been applied correctly to the data.

Stage 4: Results of the ETL data testing are collected and saved in an HTML report that can be viewed in any browser.

To achieve the ETL test automation, various components are required, some of which are explained below:

Mapping file: It is the most important component of the ETL test process. The mapping file consists of the details about the structure of each table and the queries that are used to fetch the actual data from the source and target databases at runtime for validations.

Temporary database: A temporary database is used to save the data extracted from heterogeneous data sources. Use of a temp database makes the validation process fast and easy since it is more efficient to compare data between two database rather comparing data between source files and database.

Staging/Target database: This database contains the data after completing the ETL process. Data in this database is validated with the expected data as per the guidelines set in the mapping tables.

Once the ETL test automation process is in place, organizations can leverage the following benefits:

  • Faster turnaround time of testing
  • Up to 100% test data coverage
  • Accurate data validation at a record level
  • Tests are reliable, repeatable and reusable
  • Easy to perform data as well as schema validation
  • Support for continuous integration (CI)
  • Low-cost solution

As more organizations leverage their business data, automated ETL testing will help companies get the information they need quickly, with complete coverage and minimal efforts. Pyramid Consulting’s automated ETL testing solution can make the ETL testing process seamless by fitting into the clients existing CI/CD process.

Vikas Shukla

About the author

Vikas Shukla

An agile and customer focused professional, Vikas has been Pyramid Consulting's Director of Quality Assurance since 2009. Vikas manages a team of 90+ QA professionals and leads our QA Center of Excellence.

Cookie Notice

This site uses cookies to provide you with a more responsive and personalized service. By using this site you agree to our privacy policy & the use of cookies. Please read our privacy policy for more information on the cookies we use and how to delete or block them. More info

Back to top