<?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 Challenge #8 How to concatenate multipe rows into single row grouping by a data value in Incorta Conundrums</title>
    <link>https://community.incorta.com/t5/incorta-conundrums/challenge-8-how-to-concatenate-multipe-rows-into-single-row/m-p/4759#M31</link>
    <description>&lt;P&gt;Hello again,&lt;/P&gt;
&lt;P&gt;Given a data set as below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rasha_1-1690743359681.png" style="width: 793px;"&gt;&lt;img src="https://community.incorta.com/t5/image/serverpage/image-id/2338i0719550051DE8EA8/image-dimensions/793x218?v=v2" width="793" height="218" role="button" title="Rasha_1-1690743359681.png" alt="Rasha_1-1690743359681.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;the data source is attached: Group_Concat_Test.csv&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It has&amp;nbsp; a column named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;value&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that contains a single data per row, And it is required to concatenate these rows grouping by the key column and it should be shown as comma-separated data values.&lt;/P&gt;
&lt;P&gt;It should be like that:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rasha_2-1690743429134.png" style="width: 835px;"&gt;&lt;img src="https://community.incorta.com/t5/image/serverpage/image-id/2339iDF20037611115CA8/image-dimensions/835x192?v=v2" width="835" height="192" role="button" title="Rasha_2-1690743429134.png" alt="Rasha_2-1690743429134.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please help me to achieve it 🤷‍&lt;span class="lia-unicode-emoji" title=":female_sign:"&gt;♀️&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;.&lt;/P&gt;</description>
    <pubDate>Sun, 30 Jul 2023 18:58:39 GMT</pubDate>
    <dc:creator>Rasha</dc:creator>
    <dc:date>2023-07-30T18:58:39Z</dc:date>
    <item>
      <title>Challenge #8 How to concatenate multipe rows into single row grouping by a data value</title>
      <link>https://community.incorta.com/t5/incorta-conundrums/challenge-8-how-to-concatenate-multipe-rows-into-single-row/m-p/4759#M31</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;
&lt;P&gt;Given a data set as below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rasha_1-1690743359681.png" style="width: 793px;"&gt;&lt;img src="https://community.incorta.com/t5/image/serverpage/image-id/2338i0719550051DE8EA8/image-dimensions/793x218?v=v2" width="793" height="218" role="button" title="Rasha_1-1690743359681.png" alt="Rasha_1-1690743359681.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;the data source is attached: Group_Concat_Test.csv&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It has&amp;nbsp; a column named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;value&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that contains a single data per row, And it is required to concatenate these rows grouping by the key column and it should be shown as comma-separated data values.&lt;/P&gt;
&lt;P&gt;It should be like that:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rasha_2-1690743429134.png" style="width: 835px;"&gt;&lt;img src="https://community.incorta.com/t5/image/serverpage/image-id/2339iDF20037611115CA8/image-dimensions/835x192?v=v2" width="835" height="192" role="button" title="Rasha_2-1690743429134.png" alt="Rasha_2-1690743429134.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please help me to achieve it 🤷‍&lt;span class="lia-unicode-emoji" title=":female_sign:"&gt;♀️&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2023 18:58:39 GMT</pubDate>
      <guid>https://community.incorta.com/t5/incorta-conundrums/challenge-8-how-to-concatenate-multipe-rows-into-single-row/m-p/4759#M31</guid>
      <dc:creator>Rasha</dc:creator>
      <dc:date>2023-07-30T18:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge #8 How to concatenate multipe rows into single row grouping by a data value</title>
      <link>https://community.incorta.com/t5/incorta-conundrums/challenge-8-how-to-concatenate-multipe-rows-into-single-row/m-p/4791#M34</link>
      <description>&lt;P&gt;I am certain the ordering of the values can be done, but I've spent longer than I had anticipated just getting this simple select to work:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;SELECT&lt;/SPAN&gt; &lt;SPAN&gt;"Key"&lt;/SPAN&gt;, &lt;SPAN&gt;array_join&lt;/SPAN&gt;(&lt;SPAN&gt;collect_set&lt;/SPAN&gt;(&lt;SPAN&gt;"Value"&lt;/SPAN&gt;), &lt;SPAN&gt;','&lt;/SPAN&gt;) &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;VLU&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FROM&lt;/SPAN&gt; &lt;SPAN&gt;"PivotTest"&lt;/SPAN&gt;.&lt;SPAN&gt;"PivotTestSource"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;group&lt;/SPAN&gt; &lt;SPAN&gt;by&lt;/SPAN&gt; &lt;SPAN&gt;"Key"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;order&lt;/SPAN&gt; &lt;SPAN&gt;by&lt;/SPAN&gt; &lt;SPAN&gt;key&lt;/SPAN&gt; &lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt;I imported the text file ( note: I don't &lt;/SPAN&gt;&lt;SPAN&gt;recommend&lt;/SPAN&gt;&lt;SPAN&gt; using keywords as column names &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; ) ran the table, then created an MV using Spark SQL &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt;( I did it in the notebook view so I could test it easily as I went NOTE TO PRODUCT TEAM! &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt;and the results are&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RADSr_0-1691521138739.png" style="width: 552px;"&gt;&lt;img src="https://community.incorta.com/t5/image/serverpage/image-id/2350iA67F7A8F6AAD381D/image-dimensions/552x178?v=v2" width="552" height="178" role="button" title="RADSr_0-1691521138739.png" alt="RADSr_0-1691521138739.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Aug 2023 19:03:20 GMT</pubDate>
      <guid>https://community.incorta.com/t5/incorta-conundrums/challenge-8-how-to-concatenate-multipe-rows-into-single-row/m-p/4791#M34</guid>
      <dc:creator>RADSr</dc:creator>
      <dc:date>2023-08-08T19:03:20Z</dc:date>
    </item>
  </channel>
</rss>

