Skip to content

Commit

Permalink
Merge pull request #185 from manimaranm7/patch-1
Browse files Browse the repository at this point in the history
Patch - Use correct alias names for variables referring to the "gold" tables
  • Loading branch information
afelix-95 authored Sep 27, 2024
2 parents 43fbb92 + 02baad9 commit c21648a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Instructions/Labs/03b-medallion-lakehouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ Note that you could have done all of this in a single notebook, but for the purp

dfUpdates = dfdimDate_gold

deltaTable.alias('silver') \
deltaTable.alias('gold') \
.merge(
dfUpdates.alias('updates'),
'silver.OrderDate = updates.OrderDate'
'gold.OrderDate = updates.OrderDate'
) \
.whenMatchedUpdate(set =
{
Expand Down Expand Up @@ -397,10 +397,10 @@ Note that you could have done all of this in a single notebook, but for the purp

dfUpdates = dfdimCustomer_gold

deltaTable.alias('silver') \
deltaTable.alias('gold') \
.merge(
dfUpdates.alias('updates'),
'silver.CustomerName = updates.CustomerName AND silver.Email = updates.Email'
'gold.CustomerName = updates.CustomerName AND gold.Email = updates.Email'
) \
.whenMatchedUpdate(set =
{
Expand Down Expand Up @@ -479,10 +479,10 @@ Note that you could have done all of this in a single notebook, but for the purp

dfUpdates = dfdimProduct_gold

deltaTable.alias('silver') \
deltaTable.alias('gold') \
.merge(
dfUpdates.alias('updates'),
'silver.ItemName = updates.ItemName AND silver.ItemInfo = updates.ItemInfo'
'gold.ItemName = updates.ItemName AND gold.ItemInfo = updates.ItemInfo'
) \
.whenMatchedUpdate(set =
{
Expand Down Expand Up @@ -556,10 +556,10 @@ Note that you could have done all of this in a single notebook, but for the purp

dfUpdates = dffactSales_gold

deltaTable.alias('silver') \
deltaTable.alias('gold') \
.merge(
dfUpdates.alias('updates'),
'silver.OrderDate = updates.OrderDate AND silver.CustomerID = updates.CustomerID AND silver.ItemID = updates.ItemID'
'gold.OrderDate = updates.OrderDate AND gold.CustomerID = updates.CustomerID AND gold.ItemID = updates.ItemID'
) \
.whenMatchedUpdate(set =
{
Expand Down

0 comments on commit c21648a

Please sign in to comment.