<?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 Parent Hierarchy Queries/ Path Function /Recursive CTE's in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/parent-hierarchy-queries-path-function-recursive-cte-s/m-p/11452#M6423</link>
    <description>&lt;P&gt;&lt;B&gt;Problem Statement:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a scenario where we get the data from the source in the format of (in actual 20 Levels and number of fields are more than 4 but for ease of understanding let’s consider below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The actual code involved 20 levels of 4-5 fields each and with 20 joins/CTE for getting outputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;&lt;B&gt;Power BI level&lt;/B&gt; handling, &lt;A href="https://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fdax%2Fpath-function-dax&amp;amp;data=05%7C01%7CJanga.Reddy%40lntinfotech.com%7C502bea87c2a747a4d8ca08daf902e365%7C02aa9fc118bc4798a020e01c854dd434%7C1%7C0%7C638096088038464032%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=DrBmApBcsxd3UhwyXjMHbYc8NToHugObn%2FxhVIKevWM%3D&amp;amp;reserved=0" alt="https://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fdax%2Fpath-function-dax&amp;amp;data=05%7C01%7CJanga.Reddy%40lntinfotech.com%7C502bea87c2a747a4d8ca08daf902e365%7C02aa9fc118bc4798a020e01c854dd434%7C1%7C0%7C638096088038464032%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=DrBmApBcsxd3UhwyXjMHbYc8NToHugObn%2FxhVIKevWM%3D&amp;amp;reserved=0" target="_blank"&gt;Path&lt;/A&gt; Function is great and can generate the | separated lineage but, while visualizing it needs the separate column creation&lt;/P&gt;&lt;P&gt;But it will be overkill for the render time,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Do we have any similar in-built functions/libraries in Databricks (SQL,Pyspark, Dataframes,pandas) ??&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest the optimized approach for this problem statement? (Consider the performance)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly find the example in attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2023 08:05:31 GMT</pubDate>
    <dc:creator>Phani1</dc:creator>
    <dc:date>2023-01-18T08:05:31Z</dc:date>
    <item>
      <title>Parent Hierarchy Queries/ Path Function /Recursive CTE's</title>
      <link>https://community.databricks.com/t5/data-engineering/parent-hierarchy-queries-path-function-recursive-cte-s/m-p/11452#M6423</link>
      <description>&lt;P&gt;&lt;B&gt;Problem Statement:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a scenario where we get the data from the source in the format of (in actual 20 Levels and number of fields are more than 4 but for ease of understanding let’s consider below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The actual code involved 20 levels of 4-5 fields each and with 20 joins/CTE for getting outputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;&lt;B&gt;Power BI level&lt;/B&gt; handling, &lt;A href="https://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fdax%2Fpath-function-dax&amp;amp;data=05%7C01%7CJanga.Reddy%40lntinfotech.com%7C502bea87c2a747a4d8ca08daf902e365%7C02aa9fc118bc4798a020e01c854dd434%7C1%7C0%7C638096088038464032%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=DrBmApBcsxd3UhwyXjMHbYc8NToHugObn%2FxhVIKevWM%3D&amp;amp;reserved=0" alt="https://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fdax%2Fpath-function-dax&amp;amp;data=05%7C01%7CJanga.Reddy%40lntinfotech.com%7C502bea87c2a747a4d8ca08daf902e365%7C02aa9fc118bc4798a020e01c854dd434%7C1%7C0%7C638096088038464032%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=DrBmApBcsxd3UhwyXjMHbYc8NToHugObn%2FxhVIKevWM%3D&amp;amp;reserved=0" target="_blank"&gt;Path&lt;/A&gt; Function is great and can generate the | separated lineage but, while visualizing it needs the separate column creation&lt;/P&gt;&lt;P&gt;But it will be overkill for the render time,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Do we have any similar in-built functions/libraries in Databricks (SQL,Pyspark, Dataframes,pandas) ??&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest the optimized approach for this problem statement? (Consider the performance)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly find the example in attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 08:05:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parent-hierarchy-queries-path-function-recursive-cte-s/m-p/11452#M6423</guid>
      <dc:creator>Phani1</dc:creator>
      <dc:date>2023-01-18T08:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Parent Hierarchy Queries/ Path Function /Recursive CTE's</title>
      <link>https://community.databricks.com/t5/data-engineering/parent-hierarchy-queries-path-function-recursive-cte-s/m-p/11453#M6424</link>
      <description>&lt;P&gt;I don't think that we have anything similar as a built-in function. You'll need to write some custom code to achieve that.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 06:54:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parent-hierarchy-queries-path-function-recursive-cte-s/m-p/11453#M6424</guid>
      <dc:creator>daniel_sahal</dc:creator>
      <dc:date>2023-01-19T06:54:39Z</dc:date>
    </item>
  </channel>
</rss>

