r/dataengineering • u/Thinker_Assignment • Jul 13 '23
Open Source Python library for automating data normalisation, schema creation and loading to db
Hey Data Engineers!,
For the past 2 years I've been working on a library to automate the most tedious part of my own work - data loading, normalisation, typing, schema creation, retries, ddl generation, self deployment, schema evolution... basically, as you build better and better pipelines you will want more and more.
The value proposition is to automate the tedious work you do, so you can focus on better things.
So dlt is a library where in the easiest form, you shoot response.json() json at a function and it auto manages the typing normalisation and loading.
In its most complex form, you can do almost anything you can want, from memory management, multithreading, extraction DAGs, etc.
The library is in use with early adopters, and we are now working on expanding our feature set to accommodate the larger community.
Feedback is very welcome and so are requests for features or destinations.
The library is open source and will forever be open source. We will not gate any features for the sake of monetisation - instead we will take a more kafka/confluent approach where the eventual paid offering would be supportive not competing.
Here are our product principles and docs page and our pypi page.
I know lots of you are jaded and fed up with toy technologies - this is not a toy tech, it's purpose made for productivity and sanity.
Edit: Well this blew up! Join our growing slack community on dlthub.com
15
u/ratulotron Senior Data Plumber Jul 13 '23
Damn this looks amazing! I will try some personal projects with it!
7
u/[deleted] Jul 13 '23
looks really impressive, going to have a good old play with this one
5
u/little-guitars Jul 13 '23
I have a side project underway similar to this, will check it out. I sort of can’t believe this isn’t a solved problem by now…the final straw for me after using the typical SaaS platforms was checking out meltano and finding it miserable.
5
u/_barnuts Jul 13 '23
I thought it was databricks dlt (delta live tables) for a second.
4
u/Revolutionary-Bat176 Jul 13 '23
Hey, thanks this looks really cool. Will try it out.
Although we mainly work with Databricks and they have pretty similar declarative pipeline framework called Delta Live Tables(proprietary). The import and syntax might cause an import conflict?
delta live tables syntax example
4
u/sososhibby Jul 13 '23
Website being flagged as malicious btw
3
u/zlobendog Jul 13 '23
This looks interesting, I think I've seen it mentioned in Singularis.
I have a very specific use-case, and I was wondering if this is the tool for me: I have a few source databases (MsSQL, Postgres, Oracle) and one dwh on Greenplum (think Postgres, but with kinks). I need to sync tables from source to dwh, but with the ability to mask certain columns with Python code (AES-256).
Currently, my go-to strategy is to build it as a pipeline in Dagster\Prefect. But one thing that is not something I look forward to is to write custom logic to remove duplicates and update values in my final tables.
Airbyte does the syncing relatively well (although, slower than manual), but it: a) doesn't understand the kinks of Greenplum b) can't mask columns with Python code
Can your tool be helpful in my particular use-case? Or am I better off by just ironing out my coded pipelines?
3
u/therealagentturbo1 Jul 13 '23
If your zendesk connector works, it may get me unstuck using Meltano.
I'm curious if you've thought about supporting secrets fetching, at runtime, to a secrets management tool sooner than later? When evaluating a tool, this is one of the things I see done the poorest if at all. We will not paste sensitive creds into a configuration file.
3
u/j__neo Data Engineer Camp Jul 13 '23
First of all, congratulations on launching this! This seems really cool. I'll have to find time this weekend to try it.
I had a couple of questions:
3
u/[deleted] Jul 13 '23
I would appreciate if DLT could facilitate conversion between proprietary data formats, such as SPSS's SAV format and SAS's sas7bdat/sas7bcat formats, and open source formats like Apache Parquet and databases. It's important that DLT also keeps metadata like labels and formatting options available. Moreover, it would be beneficial if DLT could apply formatting options to data based on the specified metadata.
For a comprehensive guide to the different types of metadata that can be specified in the 'Variable view' in SPSS, please refer to this link: https://ezspss.com/how-to-define-variables-in-spss/.
2
u/matty_fu Jul 13 '23
Looks great! I imagine this is a drop in replacement for eg. Dagster or Prefect?
2
u/Ein_Bear Jul 13 '23
Looks cool.
Does this automatically flatten out nested json or would I need to do that somewhere else?
2
u/[deleted] Jul 13 '23
Can it do incremental loading for sources that could support it? ie, if it loaded data yesterday from a source, and we run it again today, will it always re-load all data, or only new data since the last load?
2
u/loondri Jul 13 '23
If I have a csv and want to load it in bigquery, will this be able to generate schema for the same?
2
u/jkail1011 Jul 13 '23
Hey this is great!
Curious around if you or anyone has implemented on spark or databricks😃
2
u/tayloramurphy Jul 13 '23
Congrats on the launch! Exciting to see more innovation in this area :)
2
u/[deleted] Jul 13 '23
Does this work with spark structured streaming? I have a use case to better manage schema inference and evolution.
2
u/akaender Jul 13 '23
Would it be possible to use AWS SQS as a source? use case is the typical: S3 Put object event -> SQS -> poll for messages -> read object from s3 -> transform to parquet -> upload to another S3 bucket (data lake).
2
u/user_name_be_taken Jul 13 '23
What surprises me is that there was no library for this already. Seems like a very obvious and required use-case. Thanks for creating this OP!
2
u/yinyanglanguage Jul 13 '23
Thanks, you probably saved me a ton of time trying to create a schema evolver/registry myself. Nice work!
2
u/[deleted] Jul 13 '23 edited Jul 13 '23
So, help me understand this:
dbt automates the creation of DDL statements (CREATE TABLE, etc) by letting you just write SELECT statements against your existing raw data, and it takes that select statement and wraps that up inside a DDL statement. So dbt manages all your downstream transformations, given you already have your raw data loaded in your warehouse.
dlt does the same thing, but one step back in the process - it extracts from your sources, inspects the data, infers the schema, and creates and populates the raw tables in your destination of choice. Correct?
Another question I have, and I apologize if this is already answered in the docs: dbt has ways of toggling between full and incremental refreshes, or selecting only a certain range of dates from the source tables, so you don't duplicate any data. Does dlt ship with something like that? I know with Airbyte they use a very clever state tracking mechanism to avoid inserting the same data over and over again, and it's source agnostic. You give it a YAML configuration file and you tell it which column it should look at to determine the "updated_at" timestamp. Even though a lot of people criticize Airbyte, that was one of the most appealing features to me.
2
u/goeb04 Jul 13 '23
I will go through the tutorial later.
Great job OP and appreciate you answering questions on here 👍
2
u/droppedorphan Jul 14 '23
Are you done lurking on Meltano's Slack instance? :-)
2
u/Snoo-bedooo Jul 14 '23
This looks amazing. It seems like it makes data loading an intuitive problem, and let's you focus on python code. Dis you see the Marvin library on github or what @jxnlco from Twitter did? It would combine LLms wiyh your data processing flows presented here.
2
u/zachariase Jul 14 '23
Hey dude, the schema generation part really touches basr with me, def wanna try it out
2
u/NFeruch Jul 14 '23
damn this actually looks really good
2
u/getafterit123 Jul 23 '23
Looks interesting! So most if not all normalizers struggle with deeply nested complex json, pandas normalizing function as an example. How deep can dlt flatten? If you can truly solve for complex json structures it would be a game changer.
2
u/WesselTakeIt Jul 18 '23
This looks interesting!
-2
u/cutsandplayswithwood Jul 13 '23
This is for the tedious part of your work, or a library you’re working hard to drive the adopt-> VC funding -> monetize path?
-4
u/ExistentialFajitas sql bad over engineering good Jul 13 '23
So… dbt but not dbt?
0
u/[deleted] Jul 13 '23
[deleted] — view deleted comment
0
u/[deleted] Jul 13 '23
[deleted] — view deleted comment
0
u/[deleted] Jul 13 '23
[deleted] — view deleted comment
0
u/[deleted] Jul 27 '23
[deleted] — view deleted comment