Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Limitless Analytics with Azure Synapse

You're reading from   Limitless Analytics with Azure Synapse An end-to-end analytics service for data processing, management, and ingestion for BI and ML

Arrow left icon
Product type Paperback
Published in Jun 2021
Publisher Packt
ISBN-13 9781800205659
Length 392 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Saranya Ravichander Saranya Ravichander
Author Profile Icon Saranya Ravichander
Saranya Ravichander
Prashant Kumar Mishra Prashant Kumar Mishra
Author Profile Icon Prashant Kumar Mishra
Prashant Kumar Mishra
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Section 1: The Basics and Key Concepts
2. Chapter 1: Introduction to Azure Synapse FREE CHAPTER 3. Chapter 2: Considerations for Your Compute Environment 4. Section 2: Data Ingestion and Orchestration
5. Chapter 3: Bringing Your Data to Azure Synapse 6. Chapter 4: Using Synapse Pipelines to Orchestrate Your Data 7. Chapter 5: Using Synapse Link with Azure Cosmos DB 8. Section 3: Azure Synapse for Data Scientists and Business Analysts
9. Chapter 6: Working with T-SQL in Azure Synapse 10. Chapter 7: Working with R, Python, Scala, .NET, and Spark SQL in Azure Synapse 11. Chapter 8: Integrating a Power BI Workspace with Azure Synapse 12. Chapter 9: Perform Real-Time Analytics on Streaming Data 13. Chapter 10: Generate Powerful Insights on Azure Synapse Using Azure ML 14. Section 4: Best Practices
15. Chapter 11: Performing Backup and Restore in Azure Synapse Analytics 16. Chapter 12: Securing Data on Azure Synapse 17. Chapter 13: Managing and Monitoring Synapse Workloads 18. Chapter 14: Coding Best Practices 19. Other Books You May Enjoy

Optimizing transactions in Synapse SQL

In simple words, a group of data modification operations is called a transaction. If all operations are successful, we can call it a successful transaction. In a successful transaction, all the modifications are committed and become a permanent part of the database; otherwise, all the data modifications will be erased.

In this section, we are going to learn how to manage transactions in Synapse SQL pools. In the case of any failure, you will need to roll back all the changes made during the execution of stored procedures in order to maintain consistency in your data. You can handle any sort of exceptions in stored procedures using a TRY-CATCH block, as illustrated in the following code snippet:

SET NOCOUNT ON;
DECLARE @xact_state smallint = 0;
BEGIN TRAN
    BEGIN TRY
        DECLARE @i INT;        
       ...
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 €18.99/month. Cancel anytime