<?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 Re: withColumnRenamed does not work with databricks-connect 14.3.0 in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/withcolumnrenamed-does-not-work-with-databricks-connect-14-3-0/m-p/69279#M33883</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/616"&gt;@shan_chandra&lt;/a&gt;&amp;nbsp; thank you for your answer.&lt;/P&gt;&lt;P&gt;I am using Scala, not Python. Nevertheless, I tried using the &lt;SPAN&gt;&lt;STRONG&gt;withColumnsRenamed()&lt;/STRONG&gt;, but sadly it shows the same issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbal_0-1715954146271.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7631i36DA08757D386D85/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="dbal_0-1715954146271.png" alt="dbal_0-1715954146271.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2024 13:56:44 GMT</pubDate>
    <dc:creator>dbal</dc:creator>
    <dc:date>2024-05-17T13:56:44Z</dc:date>
    <item>
      <title>withColumnRenamed does not work with databricks-connect 14.3.0</title>
      <link>https://community.databricks.com/t5/data-engineering/withcolumnrenamed-does-not-work-with-databricks-connect-14-3-0/m-p/68775#M33746</link>
      <description>&lt;DIV&gt;I am not able to run our unit tests suite due a possible bug in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://central.sonatype.com/artifact/com.databricks/databricks-connect/overview" target="_self"&gt;&lt;STRONG&gt;databricks-connect&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;library.&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The problem is with the Dataframe transformation&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;withColumnRenamed&lt;/STRONG&gt;. When I run it in a Databricks cluster (Databricks Runtime 14.3 LTS), the column is renamed correctly. But when we run in the local machine (databricks-connect) unit tests, the column is never renamed.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Investigating the query plan in both environments I noticed that the Physical Plan in Databricks actually generates a Projection. The plan generated by databricks-connect does not. See images below.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Running in Databricks Runtime 14.3 LTS&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbal_3-1715382511871.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7522iC6916720011ADA40/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="dbal_3-1715382511871.png" alt="dbal_3-1715382511871.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Running in local machine using databricks-connect:14.3.0&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbal_4-1715382516217.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7523iDC83454C56C27D26/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="dbal_4-1715382516217.png" alt="dbal_4-1715382516217.png" /&gt;&lt;/span&gt;&lt;P&gt;If I instead of &lt;EM&gt;withColumnRenamed&lt;/EM&gt; I use &lt;EM&gt;select&lt;/EM&gt;, then it works as expected, as shown below:&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbal_1-1715383269610.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7525i4C4ADCD722697559/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="dbal_1-1715383269610.png" alt="dbal_1-1715383269610.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 10 May 2024 23:22:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/withcolumnrenamed-does-not-work-with-databricks-connect-14-3-0/m-p/68775#M33746</guid>
      <dc:creator>dbal</dc:creator>
      <dc:date>2024-05-10T23:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: withColumnRenamed does not work with databricks-connect 14.3.0</title>
      <link>https://community.databricks.com/t5/data-engineering/withcolumnrenamed-does-not-work-with-databricks-connect-14-3-0/m-p/69184#M33843</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102256"&gt;@dbal&lt;/a&gt;&amp;nbsp;- can you please try &lt;STRONG&gt;withColumnsRenamed()&lt;/STRONG&gt; instead&lt;/P&gt;
&lt;P&gt;Reference:&amp;nbsp;&lt;A href="https://docs.databricks.com/en/release-notes/dbconnect/index.html#databricks-connect-1430-python" target="_blank"&gt;https://docs.databricks.com/en/release-notes/dbconnect/index.html#databricks-connect-1430-python&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 16:11:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/withcolumnrenamed-does-not-work-with-databricks-connect-14-3-0/m-p/69184#M33843</guid>
      <dc:creator>shan_chandra</dc:creator>
      <dc:date>2024-05-16T16:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: withColumnRenamed does not work with databricks-connect 14.3.0</title>
      <link>https://community.databricks.com/t5/data-engineering/withcolumnrenamed-does-not-work-with-databricks-connect-14-3-0/m-p/69279#M33883</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/616"&gt;@shan_chandra&lt;/a&gt;&amp;nbsp; thank you for your answer.&lt;/P&gt;&lt;P&gt;I am using Scala, not Python. Nevertheless, I tried using the &lt;SPAN&gt;&lt;STRONG&gt;withColumnsRenamed()&lt;/STRONG&gt;, but sadly it shows the same issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbal_0-1715954146271.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/7631i36DA08757D386D85/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="dbal_0-1715954146271.png" alt="dbal_0-1715954146271.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 13:56:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/withcolumnrenamed-does-not-work-with-databricks-connect-14-3-0/m-p/69279#M33883</guid>
      <dc:creator>dbal</dc:creator>
      <dc:date>2024-05-17T13:56:44Z</dc:date>
    </item>
  </channel>
</rss>

