DP-200 & DP-201 Azure Data Engineer Associate Certification: Part 1 Data Engineering Concepts



Hello Reader,

 

In this series, I will present the concepts needed that you need to know to get the Azure Data Engineer Associate Certification. Remember to check Microsoft's official documentation and training before attempting the exam. The certification path is composed of 2 exams:

  

  • Exam DP-200 Implementing an Azure Data Solution 
  • Exam DP-201: Designing an Azure Data Solution

 

I will divide the post into five parts as listed below:  

  • Part 1 Data Engineering Concepts
  • Part 2 Cosmos DB
  • Part 3 Azure SQL DB and SQL DWH
  • Part 4 Data Bricks, Azure Data Fabric
  • Part 5 Data Security and Monitoring

 

So what are we waiting for, let's get started!

 

In a database the data is organized in schemas, a schema is a container that helps to organize the tables and the access to the data.

 

The two main workloads that we should consider when we think about how data is managed in an organization are:

 

  • OLTP (online transactional processing): the database is used to store transactional data, typically generated by business applications, the workload is characterized by frequent insert and update operations that involve a small amount of data ( frequent fast operations )
  • OLAP (online analytical processing): the database is used for analytical purposes, it stores large amounts of historical data, few and large insert operations, complex queries that can take several minutes or hours.

 

The data in a database is modeled based on the use cases mentioned before: OLTP the data is modeled in a normalized form (called third normal form) each table contains the minimum amount of information needed to describe the entity it represents. A large number of tables and relations between tables.


On the other hand in the case of OLAP, the data is more denormalized,  fact tables containing facts of the business (like sales or orders). Fact tables are linked to a set of tables called dimensions  (e.g. dimensions are the store, week, product related to a sales). A data model with facts and dimensions is called star schema (because it has the shape of a star), in case the dimensions are further normalized the model is called snowflake (because it has the shape of a snowflake). It is worth mentioning the work of Kimball and Inmon on data warehouse and data modeling.



Database strong consistency rules or ACID rules: Atomicity atomic transactions, Consistency if the transaction cannot be committed and saved as expected is fully rolled back, Isolation multiple transactions running in parallel cannot affect each other, Durability once a transaction is committed the data should be stored permanently.

 

Data can assume different forms, the most common classification is based on the following categories:

  • Structured: data organized in a tabular format with a header and the columns separated, fixed structure. This kind of data can be easily loaded into relational databases. The fixed structure limits its flexibility. Examples of structured data are CSV, etc.
  • Unstructured: unstructured data is data that does not have a fixed structure, like logs, images. The extreme variability allows to keep up with a fast pace changing data.

 

There are different approaches and technologies we can leverage to process, store, and access data:

  • Relational Database: recommended for OLTP workload and to support business applications, typically works as a single instance and scales vertically meaning that to increase the performance you need to increase the resource of one machine. SQL database is used to manage structured data in the form of transactions. Related service Azure SQL Database.
  • Data Warehouse: recommended for OLAP workload of structured data, typically the architecture is based on an MMP (massively parallel processing engine) where a control node distribute the workload among multiple worker nodes. The MMP architecture allows horizontal scaling, meaning that to increase the performance of the system you add new worker nodes. Related service Azure Synapse SQL (SQL Data Warehouse).
  • Data Lake: Storage designed to ingest a large amount of unstructured data. Related service Azure Data Lake Storage Gen2.
  • No SQL Database: No SQL stand for Not only SQL. Typically we cannot use SQL to query this kind of database. NoSQL databases provide horizontal scaling and flexibility. Different category of NoSQL databases can cover different use cases:
    • Document Database: data is stored in a highly variable format (JSON), documents retrieved by unique keys, free structure. Use cases product catalog, content management. Databases under this category Azure Cosmos DB Core API and Mongo DB API
    • Key-Value Store: optimized for lookups, scalable, simplicity, used as an associative array. Use cases data caching, session manager. Databases under this category Cosmos DB Table API, Redis, Azure Blob Table Storage, HBase part of HDInsight
    • Graph Databases: data organized as a graph, nodes represent entities and the edges relationships. Use cases social graph, recommendations. Databases under this category Cosmos DB Gremlin API
    • Column-family Databases: big tables the data is extremely denormalized where each row can have hundreds or thousands of columns the number of columns in each row may vary. Use cases personalization, telemetry. Databases under this category Cosmos DB Cassandra API. 

Data is ingested and moved across the data platform. The most common approaches followed in data engineering are:

  • ETL: extract, transformation, and load. The data is extracted from a source, transformed by a processing tool, and loaded into the target system, typically a database or a data warehouse.
  • ELT: extract, load, and transformation. The data is extracted from a source and immediately loaded into the target, typically a data lake or a NoSQL database. Once the data is in the data lake is processed and transformed. The ELT is the most common approach and the most suitable to deal with big data.

Data can flow into a data platform in two main ways:

  • Batch: data is managed in batches, extracted at a predefined schedule or on-demand.
  • Streaming: it is a continuous stream of events/messages generated by a data source, processed in real-time.

High Availability: the ability of a system to be resilient and comply with a required uptime SLA. Typically the resilience is achieved through component redundancy.

 

Disaster Recovery: is a set of processes and infrastructure designed to protect the organization from major failures avoiding or minimizing service interruption and data loss. The goal is to have a plan B in case a failure happens. The two fundamental metrics used to evaluate a DR plan:

  • RTO (Recovery Time Objective): time needed to recover the system after a failure.
  • RPO (Recovery Point Objective): most recent data recovered after a failure.

The little we plan to have the two indicators the higher will be the cost to set up the DR infrastructure, the tradeoff is between the cost of the disaster recovery plan compared to the amount of money at risk due to a service interruption.

 

Data Architecture

 

The cloud is changing the way data architectures are designed. Instead of a single centralized general-purpose database, the new trend is a plethora of specialized solutions.

 

Big data architecture is meant to handle data that can not be managed by the traditional database, the diagram below shows the main components of a big data architecture


https://docs.microsoft.com/en-us/azure/architecture/data-guide/big-data/images/big-data-pipeline.png


  • Data Sources: where data is originated, can be a set of relational databases, flat files, event streams.
  • Data Storage: data is stores in a distributed data store called data lake, processed data ready to be consumed can be stored in databases, event streams can enqueue and stored in fast access in-memory databases.
  • Batch Ingestion: Ingestion happened with a pre-defined frequency, at each run a batch of data typically a set of flat files
  • Batch Processing: long-running processing job that analyzes a large amount of data
  • Real-time Ingestion: a solution to capture and store streams of events
  • Stream processing: continue aggregation and filtering of the event stream that is written in an output sink.
  • Analysis and Reporting: the final goal of a data platform is to provide insight and reporting, these activities are usually based on a highly processed and structure data layer (semantic layer).
  • Orchestration: the data ingestion and processing are organized in what is called data pipelines and orchestrated by one or more tools that are responsible to manage the schedule, control flow, and monitoring of these pipelines.

 

The diagram above shows the technology components of a big data platform, but we cannot forget the data governance capabilities among which we need to include: data security, metadata management, master data management, data quality.

 

A common big data architecture that is good to mention: lambda architecture data flows through the cold (batch) and hot (real-time) path, kappa architecture unified path for cold and hot data, IoT architecture.

 

To choose the right storage solution for a platform an architect must answer questions like: What is the volume of the data to be ingested? What are the read / write performance requirements? What type of data will be ingested? What are the downstream applications that will consume the data? How data will be accessed, what is the type/complexity of the analysis? What level of availability and consistency is required?

 

There are several services offered by Azure as a data store:

  • SQL Database: used for the transactional workload (OLTP), collect data from a single data source, strong consistency, structured data, vertically scalable
  • SQL Data Warehouse (Azure Synapse Analytics): used for the analytical workload (OLAP), reporting, analytics, data ingested from multiple data sources, can handle complex queries through MPP (massively parallel processing), strong consistency, structured data, horizontally scalable
  • Data Lake Storage (Azure Storage Blobs, Azure Data lake Gen2): can store data of any type (structured, unstructured), virtually unlimited storage, durable, highly available. The difference between Azure Blob Storage and Data Lake storage is that the latter allows the hierarchical namespace, collection of files organized into a hierarchy of folders and subfolders
  • Cosmos DB: globally distributed, multi-model (natively supports document, key-value, graph, column-family data models), supports five different levels of consistency, ultra-low latency for reads and writes.
  • HBase (HDInsight): open source NoSQL database built on top of Apache Hadoop, data is grouped by column families.

 

Additionally Azure offers Azure Data Bricks for data processing, Azure Streaming Analytics for real-time ingestion and processing, and Azure Data Fabric for data pipeline orchestrations. All these services will be described in the next parts.


This post is part of a series in five parts
  • Part 1 Data Engineering Concepts
  • Part 2 Cosmos DB
  • Part 3 Azure SQL DB and SQL DWH
  • Part 4 Data Bricks, Azure Data Fabric
  • Part 5 Data Security and Monitoring

Comments