<?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 Doing a a join within the same row in SQL in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/doing-a-a-join-within-the-same-row-in-sql/m-p/5363#M1799</link>
    <description>&lt;P&gt;My data is a dump of JSON response from an API. The schema of the json is&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;col_name  data_type
&amp;nbsp;
data           array&amp;lt;struct&amp;lt;attributes:struct&amp;lt;name: String, age: Int relationships:struct&amp;lt;address:struct&amp;lt;data:arraay&amp;lt;struct&amp;lt;id: long, type: string&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&amp;nbsp;
included    array&amp;lt;struct&amp;lt;id: long, type: string, attributes:struct&amp;lt;address: string, postalCode: string, country: string&amp;gt;&amp;gt;&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;As you can see the column &lt;I&gt;data&lt;/I&gt; contains an array of &lt;I&gt;person&lt;/I&gt; details and includes a relationship to that person's address via an id. The column &lt;I&gt;included&lt;/I&gt; contains the the actual address. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to transform this data into a new table where the person data includes the address. In short I want to get rid of this `included` business. I only have SQL to go with right now because I am using this in a STREAMING LIVE TABLE query. &lt;/P&gt;</description>
    <pubDate>Mon, 24 Apr 2023 08:56:26 GMT</pubDate>
    <dc:creator>qwerty1</dc:creator>
    <dc:date>2023-04-24T08:56:26Z</dc:date>
    <item>
      <title>Doing a a join within the same row in SQL</title>
      <link>https://community.databricks.com/t5/data-engineering/doing-a-a-join-within-the-same-row-in-sql/m-p/5363#M1799</link>
      <description>&lt;P&gt;My data is a dump of JSON response from an API. The schema of the json is&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;col_name  data_type
&amp;nbsp;
data           array&amp;lt;struct&amp;lt;attributes:struct&amp;lt;name: String, age: Int relationships:struct&amp;lt;address:struct&amp;lt;data:arraay&amp;lt;struct&amp;lt;id: long, type: string&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&amp;nbsp;
included    array&amp;lt;struct&amp;lt;id: long, type: string, attributes:struct&amp;lt;address: string, postalCode: string, country: string&amp;gt;&amp;gt;&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;As you can see the column &lt;I&gt;data&lt;/I&gt; contains an array of &lt;I&gt;person&lt;/I&gt; details and includes a relationship to that person's address via an id. The column &lt;I&gt;included&lt;/I&gt; contains the the actual address. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to transform this data into a new table where the person data includes the address. In short I want to get rid of this `included` business. I only have SQL to go with right now because I am using this in a STREAMING LIVE TABLE query. &lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 08:56:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/doing-a-a-join-within-the-same-row-in-sql/m-p/5363#M1799</guid>
      <dc:creator>qwerty1</dc:creator>
      <dc:date>2023-04-24T08:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Doing a a join within the same row in SQL</title>
      <link>https://community.databricks.com/t5/data-engineering/doing-a-a-join-within-the-same-row-in-sql/m-p/5365#M1801</link>
      <description>&lt;P&gt;@Kaniz Fatma​&amp;nbsp;isn't this basically doing an "explode" on "data" and "included" and then joining them? We end up doing join on the whole data set instead of within the row.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 03:35:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/doing-a-a-join-within-the-same-row-in-sql/m-p/5365#M1801</guid>
      <dc:creator>qwerty1</dc:creator>
      <dc:date>2023-04-25T03:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Doing a a join within the same row in SQL</title>
      <link>https://community.databricks.com/t5/data-engineering/doing-a-a-join-within-the-same-row-in-sql/m-p/5367#M1803</link>
      <description>&lt;P&gt;I used a similar solution (exploding only one column) and it worked&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 07:00:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/doing-a-a-join-within-the-same-row-in-sql/m-p/5367#M1803</guid>
      <dc:creator>qwerty1</dc:creator>
      <dc:date>2023-04-26T07:00:19Z</dc:date>
    </item>
  </channel>
</rss>

