<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Applying SCD in DLT using 3 different tables at source in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/applying-scd-in-dlt-using-3-different-tables-at-source/m-p/54078#M29981</link>
    <description>&lt;P&gt;My organization has recently started using Delta Live Tables in Databricks for data modeling. One of the dimensions I am trying to model takes data from 3 existing tables in the data lake and needs to be slowly changing dimensions (SCD Type 1).&lt;/P&gt;&lt;P&gt;This appears to be quite simple if you have just one table, according to the Databricks documentation (&lt;A href="https://docs.databricks.com/en/delta-live-tables/cdc.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.databricks.com/en/delta-live-tables/cdc.html&lt;/A&gt;). I'm struggling when trying to make the final dimension a composite of 3 source tables.&lt;/P&gt;&lt;P&gt;For example, let's say the tables are: person, personDetail, and job.&lt;/P&gt;&lt;P&gt;person:&lt;/P&gt;&lt;DIV class=""&gt;PersonID Name &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Name1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Name2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;personDetail:&lt;/P&gt;&lt;DIV class=""&gt;PersonID JobID detail &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;detail1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;detail2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;job:&lt;/P&gt;&lt;DIV class=""&gt;jobID jobName &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;job1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;job2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;The final dimension needs to have personID, detail, and jobName, and show any changes to any of the 3 tables.&lt;/P&gt;&lt;P&gt;Other than making a complicated union in Pyspark at the beginning of the code, I can't think of a way to make this work, perhaps creating each table as a separate streaming table and then joining them. Any suggestions on how this can be handled in a simplified way?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2023 08:59:00 GMT</pubDate>
    <dc:creator>nag_kanchan</dc:creator>
    <dc:date>2023-11-28T08:59:00Z</dc:date>
    <item>
      <title>Applying SCD in DLT using 3 different tables at source</title>
      <link>https://community.databricks.com/t5/data-engineering/applying-scd-in-dlt-using-3-different-tables-at-source/m-p/54078#M29981</link>
      <description>&lt;P&gt;My organization has recently started using Delta Live Tables in Databricks for data modeling. One of the dimensions I am trying to model takes data from 3 existing tables in the data lake and needs to be slowly changing dimensions (SCD Type 1).&lt;/P&gt;&lt;P&gt;This appears to be quite simple if you have just one table, according to the Databricks documentation (&lt;A href="https://docs.databricks.com/en/delta-live-tables/cdc.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.databricks.com/en/delta-live-tables/cdc.html&lt;/A&gt;). I'm struggling when trying to make the final dimension a composite of 3 source tables.&lt;/P&gt;&lt;P&gt;For example, let's say the tables are: person, personDetail, and job.&lt;/P&gt;&lt;P&gt;person:&lt;/P&gt;&lt;DIV class=""&gt;PersonID Name &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Name1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Name2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;personDetail:&lt;/P&gt;&lt;DIV class=""&gt;PersonID JobID detail &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;detail1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;detail2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;job:&lt;/P&gt;&lt;DIV class=""&gt;jobID jobName &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;job1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;job2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;The final dimension needs to have personID, detail, and jobName, and show any changes to any of the 3 tables.&lt;/P&gt;&lt;P&gt;Other than making a complicated union in Pyspark at the beginning of the code, I can't think of a way to make this work, perhaps creating each table as a separate streaming table and then joining them. Any suggestions on how this can be handled in a simplified way?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 08:59:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/applying-scd-in-dlt-using-3-different-tables-at-source/m-p/54078#M29981</guid>
      <dc:creator>nag_kanchan</dc:creator>
      <dc:date>2023-11-28T08:59:00Z</dc:date>
    </item>
  </channel>
</rss>

