7 ms·
Show HN: Dlt – Python library to automate the creation of datasets
Hi HN,
We're Anna, Adrian, Marcin and Matt, developers of dlt. dlt is an open source library to automatically create datasets out of messy, unstructured data sources. You can use the library to move data from about anywhere into most of well known SQL and vector stores, data lakes, storage buckets, or local engines like DuckDB. It automates many cumbersome data engineering tasks and can by handled by anyone who knows Python.
Here’s our Github: https://github.com/dlt-hub/dlt https://github.com/dlt-hub/dlt
Here’s our Colab demo: https://colab.research.google.com/drive/1DhaKW0tiSTHDCVmPjM-eoyL47BJ30xmP https://colab.research.google.com/drive/1DhaKW0tiSTHDCVmPjM-...
— — —
In the past we wrote hundreds of Python scripts to fit messy data sources into something that you can work with in Python - a database, Pandas frame or just a Python list. We were solving the same problems and making the similar mistakes again and again.
This is why we built an easy to use Python library called dlt that will automate most data engineering tasks. It hides the complexities of data loading and automatically generates a structured and clean datasets for immediate querying and sharing.
— — —
At its core, dlt removes the need to create the dataset schemas, react to changing data, generate append or merge statements, and to move the data in transactional and idempotent manner. Those things are automated and can be declared right in the Python code, just by decorating functions.
Add @dlt.resource decorator, give it a few hints, and convert any data into a simple pipeline that creates and updates datasets.
dlt gets the details out of your way:
1. You do not need to worry about the structure of a database or parquet files
dlt will create a nice, typed schema out of your data and will migrate it when the data changes. You can put some data contracts and Pydantic models on top to keep your data clean.
2. You do not need to write any INSERT/UPDATE or data copy statements
dlt will push the data to DuckDB, Weaviate, storage buckets and many popular SQL stores. It will align the data types, file formats, and identifier names automatically
3. You do not need to worry when you need to add new data or update the changes.
dlt lets you declare how to load the data, how to increment it and will keep the loading state together so they are always in sync.
4. You keep how you develop and test your code
Iterate and test quickly on your laptop or in a dev container. Run locally on DuckDB and just swap destination name to go to the cloud - your code, schema and data will stay the same.
5. You can work with data on your laptop.
Combine dlt with other tools and libraries to process data locally. duckdb, Pandas, Arrow tables and Rust based loading libraries like ConnectorX work nicely with dlt and process data blazingly fast, compared to the cloud.
6. You do not need to worry if your pipeline will work when you deploy it.
dlt is a minimalistic Python library, requires no backend and works whenever Python works. You can finetune it to work on constrained environments like AWS Lambda or run with Airflow, GitHub Actions or Dagster.
dlt has an Apache 2.0 license. We plan to make money by offering organizations a paid control plane, where dlt users can track and policy what every pipeline does, manage schemas and contracts across organization, create data catalogues, and share them with the team members and customers.
- friendly_deer 3y agoI've been fiddling around with meltano and finicky singer taps for 2 weeks, and today I found dlt. What a breath of fresh air -- thank you for the work! I think this is the future over the meltano and singer ecosystem -- the code quality, simplicity and ease of integration into my project, and documentation really makes this project shine.
- bradhe 3y agoNice, the demo is cool. How do you differentiate from DBT?
- rudolfix2 3y agofirst you extract and load data with dlt and then you transform them with dbt. so both tools work very well together. we did a really cool helper to make it easier(https://dlthub.com/docs/dlt-ecosystem/transformations/dbt/ https://dlthub.com/docs/dlt-ecosystem/transformations/dbt/) (I'm one of core devs in dltHub)
- nrjames 3y agoCan the Destinations also natively be used as Sources?
- MatthausK 3y ago1) Yes. We support all the databases and buckets as data sources as well. Some examples: - get data from any sql database: https://dlthub.com/docs/dlt-ecosystem/verified-sources/sql_database https://dlthub.com/docs/dlt-ecosystem/verified-sources/sql_d... or https://dlthub.com/docs/getting-started#load-data-from-a-variety-of-sources https://dlthub.com/docs/getting-started#load-data-from-a-var... - do it super quickly with pyarrow: https://dlthub.com/docs/examples/connector_x_arrow/ https://dlthub.com/docs/examples/connector_x_arrow/ - get data from any storage bucket:https://github.com/dlt-hub/verified-sources/tree/master/sources/filesystem https://github.com/dlt-hub/verified-sources/tree/master/sour... 2) Strictly technical answer: on the code level sources and destinations are different Python objects so the answer is no:) but you as a user rarely deal with them directly when coding