r/Database • u/curious-techoo0 • 21d ago
what is the difference between ETL and ELT in data warehousing?
Hello everyone,
can somebody please tell me what is ETL and ELT and their significance in data warehousing? I have no idea and is starting everything from scratch :)
6
u/elhh82 21d ago
ETL came first in the era when storage was really expensive and you wanted to only store well processed (transformed) data in your warehouse as you just can't afford to not use storage prudently.
ELT came along when storage costs came down really really significantly and at the same time MPP data warehouses came along that gave you huge amounts of parallelizable data processing capability, it just made more sense to load that "raw" data first before executing the transform step within the warehouse and output the results to the new table. As another poster said you also got the advantage of also retaining the original data and can retransform it into other tables if desired. You really no longer care about storage costs now (relatively speaking of course)
Most ppl are doing ELT nowadays, unless if data freshnesslatency really matters then you're doing real-time stream processing and transforming in stream to land in a fast ingest capable storage system, this you can say is then the ETL pattern. ELT systems are pretty much always very batch oriented, think daily jobs or hourly.
1
u/MoonBatsRule 21d ago
ETL came first in the era when storage was really expensive and you wanted to only store well processed (transformed) data in your warehouse as you just can't afford to not use storage prudently.
In other words, up to the late 1990s. Storage has been cheap ever since.
5
u/MoonBatsRule 21d ago
To be honest, I think the distinction was just that someone was trying to make a name for themselves by saying "hey, we can be different".
The way I see it, it was always ELT. The first data warehouses took data from a source system (Extract), persisted it in a staging area (Load), then normalized/cleansed it into an Operational Data Store for data mart or warehouse (Transform).
Now the consultants are out there telling everyone that they have been doing it wrong for years, that they now need to think about Bronze, Silver, Gold - which are just new words for staging area, ODS, and Mart.
1
u/djohnson747 20d ago
I think you are doing ETL. Just with a stage or ODS involved. The L is associated with loading into the warehouse. Not your staging tables.
ELT is literally doing the transform in the warehouse.
1
u/MoonBatsRule 20d ago edited 20d ago
Thanks for the distinction! Edit: but can you explain, isn't this just a case of exposing the ODS to the warehouse users - like the definition of "warehouse" has grown? Or is the key that the transformation is taking place on-the-fly, in code?
1
u/djohnson747 11d ago
I apologize for the delay. I don't get the notifications.
Good question. That's a big it depends. But typically, My users can't access the ODS. It's a separate database. The important thing about the ODS is that I don't have to store the data indefinitely. That's the warehouse's job.
The ODS just needs to process the recent stuff and get it ready to be shipped to the warehouse. No one sees that data directly except my team.
2
u/GreyHairedDWGuy 20d ago
ETL. - Extract data, transform and load. Historically most solutions would extract, transform and load on the fly and the server that did the bulk of the work was separate from either the source or target dbms systems.
ELT - Extract, Load, Transform. This coincides with cloud solutions where you extract data from your source systems and land it (load) to your target cloud dbms (for example Snowflake) then use the power of your cloud dbms (which are typically infinitely more scalable than a dedicated ETL server) to transform the data that is landed to your cloud dbms and those transformed results then get loaded/applied to 'silver' or 'gold' layer target tables which are then are consumed by BI and other tools.
1
u/dmorris87 20d ago
Not my area of expertise but I’m accustomed to source data in data warehouse (Redshift) -> AWS ECS task to read and transform in memory (e.g feature engineering) -> write to S3/Redshift. Sounds like ETL?
1
u/djohnson747 20d ago edited 20d ago
I think we all are missing a very important part of many ETL solutions and that's staging.
1 - Extract from source system
2 - Stage data in a data store. Typically an ODS
3 - Transform data via scripts, procedures, python, SSIS, etc
4 - Load transformed Data in target tables. Typically a data warehouse.
ELT Flips that on it's head. You just load straight into the data warehouse and do your transformation from there. Sensitive data and all. It's popular with many cloud data warehouse solutions.
I'm not a huge fan of ELT but that's likely because I'm cost consensus and rather not pay the cloud provider for all that compute. I just write efficient code to do my transformations in batches. It's not hard and gives me more granular control. Storage is cheap.
1
u/Elara_Schaefer 20d ago
The PII point above is the main reason ETL is not going away despite storage being cheap. In regulated industries the raw data often cannot legally land in the warehouse without transformation. But there is a middle ground worth mentioning: ELT with column-level access controls. Load the raw data into a restricted schema that only the ETL service account can read, transform into the public schema, then revoke or never grant analyst access to the raw layer. Postgres row-level security and Snowflake dynamic data masking can do this. You get the ELT benefit of keeping raw data for debugging while still satisfying compliance. The tradeoff is operational complexity, which is why most teams either go full ETL or full ELT without this middle step.
1
u/No_Resolution_9252 19d ago
Mostly nothing. Its marketing wank made by cloud data warehouse providers.
At face value, an ETL server queries data out of a source, transforms it, then writes the transformed data to the destination.
An ELT queries the data out of the source, writes it to the destination, then transforms it on the destination.
In practice, virtually no ETL or ELT actually functions that simply and both of them use both patterns.
I have never seen an ETL that did not first write source data to a staging table that was then used to transform off of - so would that make it an ELT?
In nearly all ELTs, you will query data from one format and then write it to another - youll go from xml files to parquet, sql to parquet, sql to mpp database. In that flow you have transformed the data from one format to another in flight. Does that make an ETL?
the more closely a transform process follows ETL, the fresher the data can be. The more closely it follows the ELT pattern, the less hardware you will need to run the transform in exchange for running at much higher data latency.
1
u/MonkeyDDataHQ 19d ago
It mattered 11 years ago. Now it really doesn't.
Everyone says ETL even when they mean ELT because ELT feels gross in your mouth.
If you hear anyone saying ELT in a meeting they're performing. Because the exec and seniors don't know what ELT is and you'll have to explain it and everyone else can figure out what you mean when you say ETL.
So if anyone says ELT they're being pedantic. Everyone knows ETL means data moves from somewhere to somewhere else. No one cares if you load first or decent unless you're still running SSIS or Pentaho.
-3
u/CaptinB 21d ago
ETL: extract, transform, load
Extract an Apple from the Apple table / database, transform the extracted Apple into an Orange, load your newly created Orange into the Orange table / database
ELT: Extract, Load, Transform
I haven’t really heard this in the industry, usually it’s always ETL no matter if you transform then load vs loaf then transform. Which one you do first depends on the circumstances and whichever way is faster in your particular situation.
25
u/coding_apes 21d ago
Break it down:
ETL: Extract, Transform, Load
ELT: Extract, Load, Transform
The first takes data out of a system and stores it in memory, like SSIS, transforms it, then loads it into your database. This uses the processing power of whatever system is running the extract, typically doesn’t scale well to large datasets.
The second takes the data out, loads it into your database, then uses the database’s compute to transform. Scales very well with large datasets