- I am a data scientist and data engineer
- Business Intelligence Team Lead @Mindvalley
- Designer and Instructor of Data Science Primer Course @ Magic
https://ca.linkedin.com/in/fartashh

@fartashh
fartashh.github.io
fartashh@gmail.com
Fartash Haghani
What is data engineering?
Data engineers build massive reservoirs for big data. They develop, construct, test and maintain architectures such as databases and large-scale data processing systems.
Once continuous pipelines are installed to – and from – these huge “pools” of filtered information, data scientists can pull relevant data sets for their analyses.
Roles in data organization
Data Engineers are the worker bees; they are the ones actually implementing the plan and working with the technology.
Managers (both Development and Project): Development managers may or may not do some of the technical work, but they help to manage the engineers. Project managers help handle the logistical details and time-lines to keep the project moving according to plan.
Data Architects are the visionaries. They lead the innovation and technical strategy of the product and architecture. Highly experienced and technical, they grow from an engineer position. Very experienced and valuable, they are rare ducks since they’ve essentially been working in this field since its beginning.
Data pipeline
Text

Data engineering toolbox
Databases
Relational Database
- RQLite Replicated SQLite using the Raft consensus protocol
-
MySQL The world’s most popular open source database.
- TiDB TiDB is a distributed NewSQL database compatible with MySQL protocol
- Percona XtraBackup Percona XtraBackup is a free, open source, complete online backup solution for all versions of Percona Server, MySQL® and MariaDB®
- mysql_utils Pinterest MySQL Management Tools
- MariaDB An enhanced, drop-in replacement for MySQL.
- PostgreSQL The world’s most advanced open source database.
- Amazon RDS Amazon RDS makes it easy to set up, operate, and scale a relational database in the cloud.
- Crate.IO Scalable SQL database with the NOSQL goodies.
Key-value
- Redis An open source, BSD licensed, advanced key-value cache and store.
-
Riak A distributed database designed to deliver maximum data availability by distributing data across multiple servers.
-
AWS DynamoDB A fast and flexible NoSQL database service for all applications that need consistent, single-digit millisecond latency at any scale.
-
HyperDex HyperDex is a scalable, searchable key-value store
-
SSDB A high performance NoSQL database supporting many data structures, an alternative to Redis
-
Kyoto Tycoon Kyoto Tycoon is a lightweight network server on top of the Kyoto Cabinet key-value database, built for high-performance and concurrency
-
IonDB A key-value store for microcontroller and IoT applications
Column
-
Cassandra The right choice when you need scalability and high availability without compromising performance
-
HBase The Hadoop database, a distributed, scalable, big data store.
-
Infobright Column oriented, open-source analytic database provides both speed and efficiency.
-
AWS Redshift A fast, fully managed, petabyte-scale data warehouse that makes it simple and cost-effective to analyze all your data using your existing business intelligence tools.
-
FiloDB (https://github.com/tuplejump/FiloDB) Distributed. Columnar. Versioned. Streaming. SQL.
Document
-
MongoDB An open-source, document database designed for ease of development and scaling.
-
Percona Server for MongoDB Percona Server for MongoDB® is a free, enhanced, fully compatible, open source, drop-in replacement for the MongoDB® Community Edition that includes enterprise-grade features and functionality.
-
MemDB Distributed Transactional In-Memory Database (based on MongoDB)
-
-
Elasticsearch Search & Analyze Data in Real Time.
-
Couchbase The highest performing NoSQL distributed database.
-
RethinkDB The open-source database for the realtime web.
Graph
-
Neo4j The world’s leading graph database.
-
OrientDB 2nd Generation Distributed Graph Database with the flexibility of Documents in one product with an Open Source commercial friendly license.
-
ArangoDB A distributed free and open-source database with a flexible data model for documents, graphs, and key-values.
-
Titan A scalable graph database optimized for storing and querying graphs containing hundreds of billions of vertices and edges distributed across a multi-machine cluster.
-
FlockDB A distributed, fault-tolerant graph database by Twitter.
Distributed
-
DAtomic The fully transactional, cloud-ready, distributed database.
-
Apache Geode An open source, distributed, in-memory database for scale-out applications.
-
Gaffer A large-scale graph database
Timeseries
Others
-
Tarantool Tarantool is an in-memory database and application server.
-
GreenPlum The Greenplum Database (GPDB) is an advanced, fully featured, open source data warehouse. It provides powerful and rapid analytics on petabyte scale data volumes.
-
cayley An open-source graph database. Google.
-
SnappydataSnappyData: OLTP + OLAP Database built on Apache Spark
Data Ingestion
-
Kafka Publish-subscribe messaging rethought as a distributed commit log.
-
Celery Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well.
-
AWS Kinesis A fully managed, cloud-based service for real-time data processing over large, distributed data streams.
-
RabbitMQ Robust messaging for applications.
-
FluentD An open source data collector for unified logging layer.
-
Apache Sqoop A tool designed for efficiently transferring bulk data between Apache Hadoop and structured datastores such as relational databases.
-
Heka Data Acquisition and Processing Made Easy
-
Gobblin Universal data ingestion framework for Hadoop from Linkedin
File System
-
-
Snakebite A pure python HDFS client
-
-
-
smart_open Utils for streaming large files (S3, HDFS, gzip, bz2)
-
-
Tachyon Tachyon is a memory-centric distributed storage system enabling reliable data sharing at memory-speed across cluster frameworks, such as Spark and MapReduce
-
CEPH Ceph is a unified, distributed storage system designed for excellent performance, reliability and scalability
-
OrangeFS Orange File System is a branch of the Parallel Virtual File System
-
SnackFS SnackFS is our bite-sized, lightweight HDFS compatible FileSystem built over Cassandra
-
GlusterFS Gluster Filesystem
-
XtreemFS fault-tolerant distributed file system for all storage needs
-
SeaweedFS Seaweed-FS is a simple and highly scalable distributed file system. There are two objectives: to store billions of files! to serve the files fast! Instead of supporting full POSIX file system semantics, Seaweed-FS choose to implement only a key~file mapping. Similar to the word “NoSQL”, you can call it as “NoFS”.
-
S3QL S3QL is a file system that stores all its data online using storage services like Google Storage, Amazon S3, or OpenStack.
Organizational Format
-
Apache Avro Apache Avro™ is a data serialization system
-
Apache Parquet Apache Parquet is a columnar storage format available to any project in the Hadoop ecosystem, regardless of the choice of data processing framework, data model or programming language.
-
Apache ORC The smallest, fastest columnar storage for Hadoop workloads
-
Apache Thrift The Apache Thrift software framework, for scalable cross-language services development
-
ProtoBuf Protocol Buffers – Google’s data interchange format
-
SequenceFile SequenceFile is a flat file consisting of binary key/value pairs. It is extensively used in MapReduce as input/output formats
-
Kryo Kryo is a fast and efficient object graph serialization framework for Java
Stream Processing
-
Spark Streaming Spark Streaming makes it easy to build scalable fault-tolerant streaming applications.
-
Apache Flink Apache Flink is a streaming dataflow engine that provides data distribution, communication, and fault tolerance for distributed computations over data streams.
-
Apache Storm Apache Storm is a free and open source distributed realtime computation system
-
Apache Samza Apache Samza is a distributed stream processing framework
-
Apache NiFi is an easy to use, powerful, and reliable system to process and distribute data
-
PipelineDB The Streaming SQL Database https://www.pipelinedb.com
Batch Processing
-
Hadoop MapReduce Hadoop MapReduce is a software framework for easily writing applications which process vast amounts of data (multi-terabyte data-sets) in-parallel on large clusters (thousands of nodes) of commodity hardware in a reliable, fault-tolerant manner
-
-
Spark Packages A community index of packages for Apache Spark
-
Deep Spark Connecting Apache Spark with different data stores
-
Spark RDD API Examples by Zhen He
-
Livy Livy, the REST Spark Server
-
-
AWS EMR A web service that makes it easy to quickly and cost-effectively process vast amounts of data.
-
Flink An open source platform for scalable batch and stream data processing.
-
Tez An application framework which allows for a complex directed-acyclic-graph of tasks for processing data.
-
Batch ML
-
H2O Fast scalable machine learning API for smarter applications.
-
Mahout An environment for quickly creating scalable performant machine learning applications.
-
Spark MLlib Spark’s scalable machine learning library consisting of common learning algorithms and utilities, including classification, regression, clustering, collaborative filtering, dimensionality reduction, as well as underlying optimization primitives.
-
-
Batch Graph
-
GraphLab Create A machine learning platform that enables data scientists and app developers to easily create intelligent apps at scale.
-
Giraph An iterative graph processing system built for high scalability.
-
Spark GraphX Apache Spark’s API for graphs and graph-parallel computation.
-
-
Batch SQL
-
Presto A distributed SQL query engine designed to query large data sets distributed over one or more heterogeneous data sources.
-
Hive Data warehouse software facilitates querying and managing large datasets residing in distributed storage.
-
Drill Schema-free SQL Query Engine for Hadoop, NoSQL and Cloud Storage.
Charts
&
Dashboards
-
Highcharts A charting library written in pure JavaScript, offering an easy way of adding interactive charts to your web site or web application.
-
ZingChart Fast JavaScript charts for any data set.
-
C3.js D3-based reusable chart library.
-
D3.js A JavaScript library for manipulating documents based on data.
-
D3Plus D3’s simplier, easier to use cousin. Mostly predefined templates that you can just plug data in.
-
-
SmoothieCharts A JavaScript Charting Library for Streaming Data.
-
PyXley Python helpers for building dashboards using Flask and React
-
Plotly Flask, JS, and CSS boilerplate for interactive, web-based visualization apps in Python
Workflow
-
Luigi Luigi is a Python module that helps you build complex pipelines of batch jobs.
-
Cascading Java based application development platform.
-
Airflow Airflow is a system to programmaticaly author, schedule and monitor data pipelines.
-
Azkaban Azkaban is a batch workflow job scheduler created at LinkedIn to run Hadoop jobs. Azkaban resolves the ordering through job dependencies and provides an easy to use web user interface to maintain and track your workflows.
-
Oozie Oozie is a workflow scheduler system to manage Apache Hadoop jobs
Data Lake
What is Data Lake?
A data lake is a storage repository that holds a vast amount of raw data in its native format until it is needed.
Data Lake is a term that's appeared in this decade to describe an important component of the data analytics pipeline in the world of Big Data. The idea is to have a single store for all of the raw data that anyone in an organization might need to analyze.
Data Lake Characteristics
Low Cost, Extremely Scalable Storage
The costs for storing data in a data lake are low and it can easily scale to extreme volumes.
Supporting Multiple Programming Languages and Frameworks
Thanks to the raw data that is stored in the data lake, developers can work with multiple programming languages such as Python or Java and use different frameworks such as Hive or Pig.
Data Agnostic and Immediate Access to All Data
A data lake can contain any data, from structured machine data to unstructured social media data in one central location. In addition, users have immediate access to all data, since it is in one location, which of course should be role-based.
Data Lake Characteristics
Centralized Data That Does not have to Be Moved
With a data lake, all your data is in one central location. Silos are no longer necessary, making it easier to access and mix the different data sources. In addition, it is no longer necessary to move the data from one warehouse to another.
More Insights Due to Raw Data
With a data lake, organizations can store the data in raw format, meaning that no information is lost along the way. In the future, as additional opportunities to leverage the data arise, companies can go back to the original data for answers.
The data lake shouldn't be accessed directly very much because the data is raw, you need a lot of skill to make any sense of it. You have relatively few people who work in the data lake, as they uncover generally useful views of data in the lake, they can create a number of data marts each of which has a specific model for a single bounded context. A larger number of downstream users can then treat these lakeshore marts as an authoritative source for that context.

Data Lake Vs. Data Warehouse

-
Data
A data warehouse only stores data that has been modeled/structured, while a data lake is no respecter of data. It stores it all—structured, semi-structured, and unstructured. The data warehouse can only store the orange data, while the data lake can store all the orange and blue data. -
Processing
Before we can load data into a data warehouse, we first need to give it some shape and structure—i.e., we need to model it. That’s called schema-on-write. With a data lake, you just load in the raw data, as-is, and then when you’re ready to use the data, that’s when you give it shape and structure. That’s called schema-on-read. Two very different approaches. -
Storage
One of the primary features of big data technologies like Hadoop is that the cost of storing data is relatively low as compared to the data warehouse. There are two key reasons for this: First, Hadoop is open source software, so the licensing and community support is free. And second, Hadoop is designed to be installed on low-cost commodity hardware.
-
Agility
A data warehouse is a highly-structured repository, by definition. It’s not technically hard to change the structure, but it can be very time-consuming. A data lake lacks the structure of a data warehouse, which gives developers and data scientists the ability to easily configure and reconfigure their models, queries, and apps on-the-fly. -
Security
Data warehouse technologies have been around for decades, while big data technologies (like: data lake) are relatively new. Thus, the ability to secure data in a data warehouse is much more mature than securing data in a data lake.
However, there’s a significant effort being placed on security right now in the big data industry. -
Users
For a long time, the rally cry has been BI and analytics for everyone! We’ve built the data warehouse and invited “everyone” to come, but only about 20-25% of them have come. Is it the same cry for the data lake? Will we build the data lake and invite everyone to come? Not if you’re smart. A data lake, at this point in its maturity, is best suited for the data scientists.
Challenges
of
Data Lakes
Meta Data Management
A data lake is only truly valuable to an organization if its data is tagged and catalogued. Tagged data ensure better queries and better analysis. For example, metadata is a vital component of a data lake. Metadata provides context, which is vital in a data-driven world were we have data from multiple sources.
Twitter is very good at this. In fact, each tweet collects 65 data elements used to provide context for each tweet. Metadata enables us to combine and mix data in order to achieve insights that will transform your business.
Unfortunately, applying the right metadata at the right moment to the right data within the data lake can be a challenge. Adding metadata as soon as the data is entered in the data lake is a best practice but it is not a common practice. Furthermore, there are not many tools available on the market that can assist in that.
One of the companies that actually has developed a system of automatically adding the right metadata upon data ingestion in the lake is Zaloni. Their product, which is called Bedrock, provides significant automated metadata capabilities that can enrich your raw data and provide the context required to make the most of your data, thereby solving a big challenge linked to current data lakes.
Data Governance
Data governance is a challenge for any organization dealing with data in general and big data specifically. But when it comes to data lakes, this becomes even more important. If data governance is not taken care off when starting with a data lake, you can enter ‘data limbo land’ where all kinds of issues related to data quality, metadata management or security could arise, causing your data lake to fail dramatically.
The right processes should be in place within your organization to ensure that data governance is done correctly and to ensure that the right data is stored correctly and the right and correct algorithms are used to analyse your data.
Data Preparation
Another challenge is to ensure proper dealing with the data. As more democratized access to the lake is allowed and self-service becomes more common, finding ways to address data quality and preparation becomes ever more critical.
There are two distinct options to ensure proper data preparation: 1) employ the right data scientists who understand how to create sophisticated analytics models while ensuring data quality and data lineage or 2) use a system that prepares the raw data (semi-) automatically and thereby enable end-users to easily query the data and/or import in different analytical tools to gain insights from the data.
The first option might not be suitable, because hiring, or training, data scientists is expensive and sometimes that is not possible for an organization. The second option becomes more and more available, since Big Data vendors are developing tools to do this automatically.
One of these tools is Mica, which enables self-service data preparation enabling end-users to work with the raw data how they want, collaborate with the data and analyse it using different analytical tools. The main advantage is that business users don’t have to wait until IT has done the data preparation, because they can do it themselves. Mica even enables users to operationalize the data preparation, so that it will happen automatically when relevant new data enters the lake.
Data Security
Of course, when you have all data in one central location, security becomes an issue. Already too many organizations have experienced data breaches and when your data lake is breached, it seriously could mean the end of your business. Therefore, the ‘standard’ security measures should be in place.
However, having your data stored in one place has an additional security issue. Therefore, role-based access is of extreme importance when building a data lake. The data lake should ensure that although the data is stored in one central location, access is determined based on the role you have. To enforce this, you can for example tag metadata with security data to ensure that role-based access is also implemented on the metadata level.
Data Lake in Cloud
AWS Solution

Azure Solution

Hadoop
What is Hadoop?
Hadoop is an open-source software framework for storing data and running applications on clusters of commodity hardware.
It provides massive storage for any kind of data, enormous processing power and the ability to handle virtually limitless concurrent tasks or jobs.
Hadoop is part of the Apache project sponsored by the Apache Software Foundation.
How does Hadoop work?
In simple terms, Hadoop has two main components. The first component helps to manage the data—we get the Hadoop Distributed File System (HDFS) to help us split the data, put it on different nodes, replicate it, and manage it.
The second component, MapReduce, processes the data on each node in parallel and calculates the results of the job. There is also a mechanism to help manage the data processing jobs.
1. How the Hadoop Distributed File System (HDFS) works
Hadoop has a file system that is much like the one on your desktop computer, but it allows us to distribute files across many machines. HDFS organizes information into a consistent set of file blocks and storage blocks for each node.
In the Apache distribution, the file blocks are 64MB and the storage blocks are 512 KB. Most of the nodes are data nodes, and there are also copies of the data. Name nodes exist to keep track of where all the file blocks reside.

2. How MapReduce works
As the name suggests, there are two steps in the MapReduce process—map and reduce. Let’s say you start with a file containing all the blog entries about big data in the past 24 hours and want to count how many times the words Hadoop, Big Data, and Greenplum are mentioned. First, the file gets split up on HDFS. Then, all participating nodes go through the same map computation for their local dataset—they count the number of times these words show up. When the map step is complete, each node outputs a list of key-value pairs.

In the picture below, these key-value pairs are represented by the three lists. For example, the left node (with the red number 1 on it) shows the counts:
<Big Data, 7>
<GreenPlum, 5>
<Hadoop, 4>
Once mapping is complete, the output is sent to other nodes as input for the reduce step. Before reduce runs, the key-value pairs are typically sorted and shuffled. The reduce phase then sums the lists into single entries for each word. In the picture below, we can see the output of reduce—big data added up to 19, GreenPlum to 17, and Hadoop to 19. Now, we can do something with the information—make an alert, send a notification, or provide a visualization. Keep in mind, that the job doesn’t have to be a summary calculation, MapReduce jobs could just about run any function.

There is one more important component, and it manages everything mentioned above. If we had to split terabytes of data up by hand, copy the data to 1000 different computers manually, and kick each job off, the process would take forever and be prone to error. So, there is a set of components that automate all the steps. In Hadoop, the entire process is called a job, and a job tracker exists to divide the job into tasks and schedules tasks to run on the nodes. The job tracker keeps track of the participating nodes, monitors the processes, orchestrates data flow, and handles failures. Task trackers run tasks and report to the job tracker. With this layer of management automation, Hadoop can automatically distribute jobs on a large number of nodes in parallel and scale when more nodes are added.
3. Managing Hadoop Jobs

Why is Hadoop important?

Ability to store and process huge amounts of any kind of data, quickly
With data volumes and varieties constantly increasing, especially from social media and the Internet of Things (IoT), that's a key consideration.
Computing power
Hadoop's distributed computing model processes big data fast. The more computing nodes you use, the more processing power you have.
Fault tolerance
Data and application processing are protected against hardware failure. If a node goes down, jobs are automatically redirected to other nodes to make sure the distributed computing does not fail. Multiple copies of all data are stored automatically.
Flexibility
Unlike traditional relational databases, you don’t have to preprocess data before storing it. You can store as much data as you want and decide how to use it later. That includes unstructured data like text, images and videos.
Low cost
The open-source framework is free and uses commodity hardware to store large quantities of data.
Scalability
You can easily grow your system to handle more data simply by adding nodes. Little administration is required.
Challenges
of
using Hadoop
MapReduce programming is not a good match for all problems
It’s good for simple information requests and problems that can be divided into independent units, but it's not efficient for iterative and interactive analytic tasks. MapReduce is file-intensive. Because the nodes don’t intercommunicate except through sorts and shuffles, iterative algorithms require multiple map-shuffle/sort-reduce phases to complete. This creates multiple files between MapReduce phases and is inefficient for advanced analytic computing.
Data security
Another challenge centers around the fragmented data security issues, though new tools and technologies are surfacing. The Kerberos authentication protocol is a great step toward making Hadoop environments secure.
Full-fledged data management and governance
Hadoop does not have easy-to-use, full-feature tools for data management, data cleansing, governance and metadata. Especially lacking are tools for data quality and standardization.
There’s a widely acknowledged talent gap
It can be difficult to find entry-level programmers who have sufficient Java skills to be productive with MapReduce. That's one reason distribution providers are racing to put relational (SQL) technology on top of Hadoop. It is much easier to find programmers with SQL skills than MapReduce skills. And, Hadoop administration seems part art and part science, requiring low-level knowledge of operating systems, hardware and Hadoop kernel settings.
Stream Processing





Data engineering 101
By fartash haghani
Data engineering 101
- 1,174
