1 of 41

dlt

data load tool

2 of 41

Introduction

  • What is ELT?
  • What is dlt?
  • Why dlt?
  • How does dlt work?

3 of 41

So let’s start from the beginning

What’s data engineering at all?

4 of 41

So let’s start from the beginning

What’s data engineering at all?

5 of 41

So let’s start from the beginning

What’s data engineering at all?

“I'm a plumber. I pipe data from one place to the other and make sure it's clean for the business to use.”

  • A Data Engineer on Reddit

6 of 41

In other words

But there’s a plot twist:

Data scientists deal with data engineering tasks too

7 of 41

The reality

Every data job

is a data engineering job.

8 of 41

The problem

Every data job

is a data engineering job,

but not everybody is a data engineer.

9 of 41

The problems

And every data engineer has to be ready to solve problems

… whether they arise from new business requirements

… or pipelines breaking

10 of 41

The problems … Unstructured/Nested Data

Sorting unstructured data into data models.

11 of 41

The problems … Schema Evolution

The process of modifying the structure of a database schema over time.

12 of 41

The problems … Data Contracts

Data contracts define and enforce the functionality, manageability, and reliability of data.

… like enforcing rules on schema changes.

13 of 41

The problems … Too many/ad hoc data sources

Unifying different data sources in a single data pipeline.

14 of 41

The problems … Incremental Loading

Appending, replacing, or merging data periodically.

15 of 41

The problems … Performance Issues

Streaming and managing large amounts of data.

16 of 41

The solution

dlt - Data Load Tool:

  • Open-source
  • Integrates and scales well
  • Pythonic

17 of 41

What is dlt?

18 of 41

dlt History

Adrian

Adrian

Adrian

19 of 41

What is dlt?

The dlt is an open-source Python library that simplifies data loading by automating complex tasks like schema creation, data normalization, incremental loading, etc. Much like dbt democratized the T(Transform) layer of ELT to SQL users, dlt democratizes the EL (Extract/Load) aspect of data handling with Python.

20 of 41

What is dlt?

  • Easy install and set up.
  • Easy to use, learning curve is shallow, declarative interface.
  • It’s Pythonic, you don’t have to learn new frameworks or programming languages.
  • Just a library. Runs anywhere Python runs.

import dlt

pipeline = dlt.pipeline(

pipeline_name='my_pipeline',

destination='bigquery',

dataset_name='my_data',

)

pipeline.run(data, table_name='users')

>> pip install dlt

21 of 41

What is dlt?

dlt contains all DE best practices. Anyone who ever worked with Python can create the pipeline on a Senior level:

22 of 41

What is dlt?

dlt contains all DE best practices. Anyone who ever worked with Python can create the pipeline on a Senior level:

  • Schema evolution

With dlt schema evolution is handled automatically. When modifications occur in the source data’s schema, dlt detects these changes and updates the schema accordingly.

23 of 41

What is dlt?

dlt contains all DE best practices. Anyone who ever worked with Python can create the pipeline on a Senior level:

  • Schema evolution
  • Data contracts

You can use data contracts modes to tell dlt how to apply contract for a particular entity:

  • evolve: No constraints on schema changes.
  • freeze: Raise an exception if data is encountered that does not fit the existing schema.
  • discard_row: Discard any extracted row if it does not adhere to the existing schema.
  • discard_value: Discard data in an extracted row that does not adhere to the existing schema.

24 of 41

What is dlt?

dlt contains all DE best practices. Anyone who ever worked with Python can create the pipeline on a Senior level:

  • Schema evolution
  • Data contracts
  • Incremental loading

Incremental loading is a crucial concept in data pipelines that involves loading only new or changed data instead of reloading the entire dataset.

25 of 41

What is dlt?

dlt contains all DE best practices. Anyone who ever worked with Python can create the pipeline on a Senior level:

  • Schema evolution
  • Data contracts
  • Incremental loading
  • Performance management

dlt provides several mechanisms and configuration options to manage performance and scale up pipelines:

  1. Parallel execution: extraction, normalization, and load processes in parallel.
  2. Thread pools and async execution: sources and resources that are run in parallel.
  3. Memory buffers, intermediary file sizes, and compression options.
  4. Scalability through iterators and chunking.

26 of 41

What is dlt?

Database agnostic

27 of 41

Create custom sources & destinations

Source

  • High-level declarative Rest API source
  • Low-level RestAPIClient
  • Pure Python (requests)

28 of 41

Create custom sources & destinations

Source

  • High-level declarative Rest API source
  • Low-level RestAPIClient
  • Pure Python (requests)

29 of 41

Create custom sources & destinations

Source

  • High-level declarative Rest API source
  • Low-level RestAPIClient
  • Pure Python (requests)

30 of 41

dlt ecosystem

Verified sources:

30+ existing well-tested sources, such as Postgres CDC, SQL databases, REST API connector, Google Sheets, Zendesk, Stripe, Notion, Hubspot, GitHub and others.

Destinations:

16 destinations, such as DuckDB, Postgres, Delta tables, BigQuery, Snowflake, and others.

Reverse ETL – build your own destination

Integrations:

dbt-runner, deploy helpers, Streamlit build-in app, etc.

Be it a Google Colab notebook, AWS Lambda function, an Airflow DAG, or your local laptop — dlt can be dropped in anywhere.

31 of 41

Why dlt?

From a junior’s perspective:

dlt - Data Load Tool:

  • Open-source
  • Integrates and scales well
  • Pythonic

32 of 41

Why dlt?

From a junior’s perspective:

dlt - Data Load Tool:

  • Community ⭐
  • Integrates and scales well
  • Pythonic

33 of 41

Why dlt?

From a junior’s perspective:

dlt - Data Load Tool:

  • Community ⭐
  • Saves time for other things
  • Pythonic

34 of 41

Why dlt?

From a junior’s perspective:

dlt - Data Load Tool:

  • Community ⭐
  • Saves time for other things
  • Smooth learning curve

35 of 41

Why dlt?

From a senior’s perspective:

dlt - Data Load Tool:

  • Open-source
  • Integrates and scales well
  • Pythonic

36 of 41

Why dlt?

From a senior’s perspective:

dlt - Data Load Tool:

  • Cost effective 👌
  • Integrates and scales well
  • Pythonic

37 of 41

Why dlt?

From a senior’s perspective:

dlt - Data Load Tool:

  • Cost effective 👌
  • No excuses from juniors 👌
  • Pythonic

38 of 41

Why dlt?

From a senior’s perspective:

dlt - Data Load Tool:

  • Cost effective 👌
  • No need to reinvent the wheel 👌
  • Pythonic

39 of 41

Why dlt?

From a senior’s perspective:

dlt - Data Load Tool:

  • Cost effective 👌
  • No need to reinvent the wheel 👌
  • Works where Python runs 👌

40 of 41

Why would you need dlt?

(In case you haven’t been convinced yet)

  • You can build data platforms
  • You can focus on other tasks, rather than setting up and fixing your data pipeline
    • Can come in handy if your work includes data science or data analytics
  • Low code, low effort data democratization in young teams
  • Optimize as a senior, jump the learning curve as a junior.

41 of 41

How does dlt work?

A basic dlt pipeline has three main steps:

  • extract
  • normalize
  • load

extract → fetch data from source system and write to local disk

normalize → read extracted data from local disk infer schema and transform data in memory write transformed data to local disk

load → read normalized data from local disk and ingest into destination system