https://github.com/cloudacademy/azure-synapse-scd
https://github.com/cloudacademy/azure-synapse-scd
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/cloudacademy/azure-synapse-scd
- Owner: cloudacademy
- Created: 2021-05-11T20:07:06.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-12T18:07:50.000Z (about 5 years ago)
- Last Synced: 2025-01-13T06:08:24.606Z (over 1 year ago)
- Language: TSQL
- Size: 4.88 KB
- Stars: 3
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Handling Slowly Changing Dimensions With Azure Synapse Analytics Pipelines
This file contains text you can copy and paste for the examples in Cloud Academy's _Handling Slowly Changing Dimensions With Azure Synapse Analytics Pipelines_ course.
### Introduction
[Azure Free Trial](https://azure.microsoft.com/free)
### Creating the Data Flow
HashKey expression:
```
sha2(256, iifNull(Title,'') +FirstName +iifNull(MiddleName,'') +LastName +iifNull(Suffix,'') +iifNull(CompanyName,'') +iifNull(SalesPerson,'') +iifNull(EmailAddress,'') +iifNull(Phone,''))
```
InsertedDate expression:
```
iif(isNull(InsertedDate), currentTimestamp(), {InsertedDate})
```
ModifiedDate expression:
```
currentTimestamp()
```
### Running the Data Flow
```
SELECT * from dbo.CustomerSink WHERE CustomerId = 4
```
```
UPDATE dbo.CustomerSource
SET LastName = 'Lopez'
WHERE CustomerId = 4
```
### Summary
[Azure Synapse Analytics documentation](https://docs.microsoft.com/azure/synapse-analytics/)
support@cloudacademy.com