Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Data Engineering with Apache Spark, Delta Lake, and Lakehouse

You're reading from  Data Engineering with Apache Spark, Delta Lake, and Lakehouse

Product type Book
Published in Oct 2021
Publisher Packt
ISBN-13 9781801077743
Pages 480 pages
Edition 1st Edition
Languages
Author (1):
Manoj Kukreja Manoj Kukreja
Profile icon Manoj Kukreja
Toc

Table of Contents (17) Chapters close

Preface 1. Section 1: Modern Data Engineering and Tools
2. Chapter 1: The Story of Data Engineering and Analytics 3. Chapter 2: Discovering Storage and Compute Data Lakes 4. Chapter 3: Data Engineering on Microsoft Azure 5. Section 2: Data Pipelines and Stages of Data Engineering
6. Chapter 4: Understanding Data Pipelines 7. Chapter 5: Data Collection Stage – The Bronze Layer 8. Chapter 6: Understanding Delta Lake 9. Chapter 7: Data Curation Stage – The Silver Layer 10. Chapter 8: Data Aggregation Stage – The Gold Layer 11. Section 3: Data Engineering Challenges and Effective Deployment Strategies
12. Chapter 9: Deploying and Monitoring Pipelines in Production 13. Chapter 10: Solving Data Engineering Challenges 14. Chapter 11: Infrastructure Provisioning 15. Chapter 12: Continuous Integration and Deployment (CI/CD) of Data Pipelines 16. Other Books You May Enjoy

Understanding concurrency control

By now, hopefully, we have a good understanding of ACID compliance in a Delta Lake using the transaction log. Up until now, all operations during this exercise were performed using the same user. However, in a real case scenario, you can have multiple users trying to read and write to the same delta table at the same time. This is how concurrency controls are implemented in Delta Lake.

Figure 6.43 – Concurrency control in Delta Lake

This is better represented as follows:

  • Assume User 1 and User 2 perform a write operation to a delta table at the same time.
  • Delta Lake records the version of the table before any change has been made to the delta table.
  • The write from User 1 commits successfully, and a success message is sent back.
  • The write from User 2 does not fail. Instead, Delta Lake tries to silently resolve conflicts from User 2's transaction against the previously committed data. If no conflicts...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime