SCD: Slowly changing dimensions explained with real examples
Вставка
- Опубліковано 1 жов 2017
- The video explains what are slowly changing dimensions, Their relevance in data warehousing and which SCD type should be used in what kind of data scenario.
The video Explains below with real project examples.
#SlowlyChangingDimension #SCD2 #TechCoach
SCD 0 - Passive method (No change in data)
SCD 1 - Overwriting the old value (Latest Record Only)
SCD 2 - Creating a new additional record (Maintains History)
SCD 3 - Creating an additional Column (Rarely Used)
SCD 4 - Using history table
SCD 6 - The hybrid approach
Guys please support me in building my new youtube channel "An Indian Abroad " by watching subscribing and sharing with your friends
ua-cam.com/users/AnIndianAbroadd
what about a situation where by the current snapshot doesn't contain the last data especially in a case like the employee is fired or left the job and that information is reported in a different table .How do you update the previous date and at that point will you maintain the current flag as 'Y' or'N'
SCD explained very well and with so much patience. !! Much appreciated... Thanks for sharing the knowledge on it
Thanks for the kind words buddy :)
Please consider subscribing to my other channel as well it will really help me
ua-cam.com/video/6G1xGi-D5ow/v-deo.html
Very well explained. I had an issue where I had implemented SCD 1. Later SCD 2 replaced it. I would say SCD 4 is a more elegant way. Great job! thanks for this video
Superlike!! What I like about your videos is that you give real examples.
Thanks a lot shruti :)
Hello Vivek ..thanks for sharing. I noticed that for SCD Type 3 example (at 14:50) when the salary value changes, you left out to put prev_salary and current_salary in the table although you did explain in your video that if there are more than one column change for each column there must be both previous and current values to be kept in DW.
Great video. Thanks a lot Vivek for explaining very simply and clearly!
I am glad Anand I could help :)
Thank you very much for this simplest explanation I could find over youtube! Awesome :)
Thanks Sanjay for the kind words :)
I didn't understand before watching this video now I'm able to understand the SCD concept; thanks for the information
I am glad I could help Krishna :)
Hi Vivek, Thank you for this video. It helps me a lot. I have watched several training in SCD but they made me much more confuse. But this video helped me to understand. Just I want to mention that as far as I know the surrogate key should change in each update in SCD2.
Thanks Majid, with every change ( insert in ScD 2 the surrogate key should increment)
Simple and clear explanation. Thank you Tech Coach.
Thanks Udi Tech for the kind words, I have a small request.I am working on this new channel and will really appreciate if you watch and subscribe to it
ua-cam.com/video/j7RrxEnZ_8E/v-deo.html
Very precisely and beautifully explained. I was able to understand each and every thing you explained. 👏
thanks for the excellent lesson and clear sound
This is some wonderful explanation. And they way you explain is so easy to understand and follow. Thank you so much Bro!
Thanks Mohanraj for the lovely words, I am glad I could help :)
Explanation was very precise and through the point.I really like the way you explained..!!
Could you please explain the concept of granularity in depth and its significance..
Thanks in advance.!
Thank you so much for you explanation, it was very clear!
Thanks a lot for the kind words, I have a small request I am working on this new youtube channel " An Indian Abroad " and will really appreciate if you watch and subscribe to it.
ua-cam.com/video/11DK-oyRql0/v-deo.html
Very well explained. Thank you!
Thanks Usha for the kind words.
I have a small request I am working on this new channel "An Indian abroad" and will really appreciate if you watch and subscribe to it.
ua-cam.com/video/11DK-oyRql0/v-deo.html
very nice video, good knowledge sharing
Thanks a lot for the kind words.
I would really appreciate if you help me in my new Initiative "An Indian Abroad"
by subscribing viewing and sharing.
ua-cam.com/users/AnIndianAbroadd
Thank you for the clear explanation!
Thanks Pranav for the kind words, This video on Indexing may interest you as well.
ua-cam.com/video/0X9bbtwTnuE/v-deo.html
Very informative and concise video. Thanks!
Thanks for the kind words.I have a small request, I am working on a new channel " An Indian Abroad" and it will really help me if you watch and subscribe to it.
ua-cam.com/video/11DK-oyRql0/v-deo.html
It was knowledge rain for me, thank you brother for the social work!
Too good and simple explanation of SCD.. 👍🏻
Thank you! Super concise and clear
Thanks a lot buddy :)
The way of explanation is damn clear...
Very useful for beginners.
Thanks a ton for this video
+Sivanjaneya Reddy M.V. Thanks a lot for the kind words :)
I would love your support for my new channel, Please watch subscribe and share with your friends.
ua-cam.com/channels/oLdaMxhfDgdgIAcRGlUvkg.html
nice explanation with examples
thanks for video got my final interview with amazon in 2 hours!!
All the very best buddy :)
Very Good with example & explanation
This is very informative, very easy to understand. Thank you so much for this!
I am glad I could help :)
please upload videos regarding SCD based scenarios wth both SQL and informatica (two approaches) your explanation methodology is very good.
shubham chouhan Sure Shubham I will work on it soon
Simple and easy !! Great work
Thanks a lot for the kind words Mandar :)
Very well Explanation. Thank you so much :)
+Ranvir singh Thanks a lot Ranvir Singh :)
Excellent Explanations Skills!!!
Thanks Hiren for the wonderful comment. I have a small request I am working on this new youtube channel and will really appreciate if you watch and subscribe to it.
ua-cam.com/video/HBQHekM1U2c/v-deo.html
You deserve much more viewers than now since you narrated the concepts very well,I like your videos, Thanks, dear friend.
Thanks a lot sreejith for the kind words, you made my day. I have around 80 videos and your comments boosted my confidence to make many videos.
Thanks a lot again.
Hello thank you very much for this.
For SCD type II, in your example, what happens if you are pulling data from the source every day and some day the id 123 doesn't come? How will you reflect that change in your data warehouse table? and what if then the id 123 comes again?
Is this possible?
Thanks
well explained; this SCD types always ask during technical interview.
Thanks Vin for the kind words I have a small request
I am working on this new youtube channel, I Would love it if you watch and subscribe to it as well.
ua-cam.com/video/GnVn3mPBRz4/v-deo.html
Lol i was asked this in an inteview. I said I've never heard of it. After watching this video, it turns out that I've been working on SCD for severals years now. 😂😂 I just didn't know they were called as such.
@@gregorclegane7563 exactly bro.. Just now I was asked this.. I said I don't know and searching in UA-cam now. Found this
Very nice explanation and real life examples ..kudos
Thanks Dipti for the kind words, I have a small request. I am working on this new youtube channel and will really appreciate if you watch and subscribe to it.
ua-cam.com/video/IP2Vn6jK8Hg/v-deo.html
What we want to do,if we want an additional column which is not presented in dataware house previously...?
Awesome explanation.. totally worth it!
Thanks Jyoti for the kind words.
Please consider subscribing to my other channel as well. It will really help me.
ua-cam.com/video/6G1xGi-D5ow/v-deo.html
Very well explained . Thanks
Thanks, Vivek, really its very good video to understand SCD.
If you have any video with the practice session plz share a link for the same which helps more clear.
Thanks Mohammad , Unfortunately at this moment i don't have a practice video on it.
Thanks dada (bhaiya) for your clear and concise approach to scd.
Thanks buddy for the kind words.
Please consider subscribing to my other channel as well
ua-cam.com/video/6G1xGi-D5ow/v-deo.html
Thank you , keep adding more ..👍
dhanaraju ramadi Thanks for the kind words. I will be uploading more such videos soon.
Great explanation thank you !
Thanks Saurabh for the kind words, It means a lot to me. I have a small request, I am working on this new channel and would really appreciate if you watch and subscribe to it.
ua-cam.com/video/IP2Vn6jK8Hg/v-deo.html
Beautifully explained!
I am glad I could help
Thanks. Nice and concise explanation of the different types of SCD.
Thanks a lot for the kind words :)
Thanks a lot for the kind words :)
thats awesome...very well explained..thank you very much bro.
Thanks buddy for the kind words, this video on indexing may interest you as well.
ua-cam.com/video/0X9bbtwTnuE/v-deo.html
Thanks for the clear explanation
You are welcome Keith :)
In the SCD 2 example the ID column in the datawarehouse table shows same value 123 for both old and updated records. I believe the ID column values should be different 123 , 124 etc.
Once again Good work Vivek
Thanks a lot for the kind words.
I would really appreciate if you help me in my new Initiative "An Indian Abroad"
by subscribing viewing and sharing.
ua-cam.com/users/AnIndianAbroadd
Thank you very much for your explanation 👍
Thanks for the kind words :)
Hi, thanks for the video on SCD's, watched and understood, but as per the video 0 to 6 SCD's explained except SCD 5, do we have SCD 5 as well, if not then why we go to SCD 6 without 5, why we given name to 6 for last SCD it should be 5 ?
clear and practical examples. good job
@shukri thanks for the kind words.
Please consider subscribing to my other channel as well. It will really help me.
ua-cam.com/video/6G1xGi-D5ow/v-deo.html
Hi Vivek,
Your video was very helpful.
Just one query. In case of SCD 2, can we have duplicate value for id??As it has 123 in all the cases.
In SCD usually you will have a surrogate key to uniqely identify every record also you will have a start_date end_date and /or a flag to identify the old and the latest records :)
Nice once Vivek......Keep it up
Very crisp and to the point.
Thanks buddy for the kind words,
Please consider subscribing to my other channel as well, it will really help me :)
ua-cam.com/video/6G1xGi-D5ow/v-deo.html
@golden,
please consider subscribing to my new channel it will really help me
ua-cam.com/video/6G1xGi-D5ow/v-deo.html
Well explained vivek... Big thumps up
Thanks a lot for the kind words Nishanth :)
This video may interest you as well .
ua-cam.com/video/5nfHmh8NsHw/v-deo.html
Excellent video. Only question is on scd 6. Why did you set old value equal to current value in last row?
If the ID col is primary key, then how do we add additional rows?
excellent stuffs and nicely explained.
Thanks Ahmad Syed for the kind words.
I have a small request, I am working on this new channel please do watch and subscribe to it.
Your support is my motivation. ua-cam.com/video/JobONiVWA9Q/v-deo.html
Superb explanation understand very easily thank you so much bro......
Thanks Buddy
Amazing Video (y). Get going!
Thanks a lot Aruna :)
Hi Vivek..very nice explanation..!! I have one question - for SCD 4 why we need to maintain two different tables for latest snapshot and history, we can just create a view on our SCD2 dim with condition 'to_date='12-dec-99' for the latest snapshot data and normal 'As-is' view for historical data. Please let me know if I'm missing anything. Thanks again..every video of yours is really helpful.
A view will run the underlying query everytime it is accesed which may become a big performance hit if it is called often.
Excellent performance bro really very nice and clear explanation such containt all the best bro
Thanks Buddy, please consider subscribing to my other channel it will really help me
ua-cam.com/video/gTg6nCUuYO8/v-deo.html
Simply awesome
Really great video ,easy to understand
@Vivek, Thanks for your kind words.
It made my day :)
Please consider subscribing to my other channel as well. It will really help me.
ua-cam.com/video/6G1xGi-D5ow/v-deo.html
Awesome bro...keep doing 👍🏼
Thanks a lot for the kind words, I have a small request I am working on this new youtube channel " An Indian Abroad " and will really appreciate if you watch and subscribe to it.
ua-cam.com/video/11DK-oyRql0/v-deo.html
Very well explained with nice example 🙂 thanks
Thanks a lot buddy :)
great explanation... thanks for the video
Thanks a lot buddy, I am glad I could help :)
Hi..Thank you so much for this valuable information that helps me a lot
Thank you Vivek! this was very helpful.
Regards,
Sujaa
Thanks Sujaa for your constant feedback, It helps me going :)
Have implemented scd 6 for hcm dwh for movement report ... Pretty common In hcm analytical reporting
Excellent 😊
amazing explaination.great job bro
Thanks a lot buddy :)
very nicely explained. Thankyou
Thanks a lot Megha
great simple explanation!!
Thanks a lot for the kind words :)
I would love your support for my new channel, Please watch subscribe and share with your friends.
ua-cam.com/channels/oLdaMxhfDgdgIAcRGlUvkg.html
Nice explanation
Very nice explanation 👍 , please upload some videos on ETL logic to enhance the performance
Most common methods are to view the Last_Updated flag to see if any changes occurred since the last refresh. If that's not available, I'll (reluctantly) use the CHECKSUM(col1,col2,col3) feature in SQL Server to see if there is a difference between the current data and what is in the DW (very slow though). You can speed things up by storing the checksum with the record so it doesn't have to recompute every time.
Thanks. Great video.
Thanks buddy for the kind words :)
good explanation . Really helpful for me. Tq
I am glad I could help :)
Thank you so much 😊
best explanation ever you are the best
Thanks a lot Henri :)
Thank you!!
Thanks Tony for the appreciation. I have a small request. I am working on this new youtube channel and will really appreciate if you watch and subscribe to it.
ua-cam.com/video/11DK-oyRql0/v-deo.html
wouldn't the SK which in your example appears to be ID change when you apply SCD 2? You have kept 123 for all the records in DW while applying SCD 2. As SK is also PK I don't see how it would work. Please confirm.!
You are correct in my opinion, although you would normally expect a surrogate key which will update as you say and an ID which would say the same.
awesome vid
Vivek brother it's awesome
Thanks a lot for the kind words :)
in SCD0 if we are using the column anymore then doesn't it make sense to delete the column rather than keeping it and not updating?
Great video thanks.
Thanks a lot for the Kind words :)
Good info
Thank you it is very helpful for me
Thanks buddy, I am glad I could help :)
I've got a question: in SCD Type2 isn't it more important having a surrogate key in the DW than including the column of the current flag? The current dimension can be seen in the timestamp, can't it?
Yeah! Surrogate key should be present here. If the ID column is a primary key, then it will throw an error?!
Very clear explanation
One question - On SCD2 Main table and SCD 4 History table, the amount of data will be same
Plus SCD4 will occupy more memory than SCD2 to store one extra table. But, if we need 2 reports it is better to have one extra table so that quering is fast.
In such scenarios , SCD2 is better or SCD4?
thank you so much very help full
I am glad I coulf help :)
Thank you!
I am glad I could help :)
Much appreciated ....
I am glad I could help
thank you for such good video
Thanks Vasupradha :)
9:52
ID Column I assume as a Primary key in that case in Data warehouse table new ID gets generated or Same ID get repeated?
Dear Sir , is primary or surrogate key in SCD2 will remain same for multiple entry of the same record ? As mentioned in this clip if it will remain same then how will we update the previous record ?
Surrogate key will change, No two rows can have the same surrogate keys
Nicely explained.
Thanks Vijay for the kind words :) please consider subscribing to my other channel as well.it will really help me
ua-cam.com/video/6G1xGi-D5ow/v-deo.html
Beautiful
Thank you for not having an accent so thick that you can't be understood! There are times that I have pulled videos like this and the speakers accent is so bad that they would be better off speaking their native language!
I am glad Russel I could help :)
in type2 SCD the surrogate key should also change for new record.In the video it still shows key as 123 for all three records.Surrogate Key is Primary key hence there cannot be duplicates