Using Glue for dimensional model ETL into Redshift

0

A customer is wondering if they can use Glue for their dimensional model ETL. Would it be able to populate the dimensions and facts and load it into Redshift, or would they need to create a staging table in Redshift and then populate their dimensions and facts via querying with surrogate keys?

I don't see why Glue wouldn't work for a dimensional model schema, but I'm having a really hard time finding sources and information about it.

AWS
已提問 4 年前檢視次數 777 次
1 個回答
0
已接受的答案

Glue can definitely be used for loading dimensional data into Redshift. Approach will depend on what kind of dimension it is (SCD Type). And you can certainly generate surrogate ids in Glue. Example: I have used this in the past.

def customer_id(custid):
    x = int(str(hashlib.md5(custid.encode()).hexdigest()[:10]),16)
    x = int(x)
    return x

However, make sure you follow the logic consistently across different datasets to produce consistent surrogate ids.

Ideally, a staging table should be present and from staging to main table, you can govern the logic through redshift procedure or plain SQL depending upon the complexity.

AWS
已回答 4 年前
profile picture
專家
已審閱 24 天前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南