<?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: Rounding in the databricks SQL editor in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29784#M21491</link>
    <description>&lt;P&gt;The incorrect result is because of default rounding to format 0.00. We can implement the below solution to solve the problem. It must be applied to every individual query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Option 1: Edit Visualisation&lt;/B&gt;&lt;/P&gt;&lt;P&gt;After clicking Edit visualization, we can change the default Number format to 0.000&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1417iF0D4A570F752230B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;B&gt;Option 2: Format number&lt;/B&gt;&lt;/P&gt;&lt;P&gt;We can use the format_number function to override the default rounding format.&lt;B&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1420iC4BEE906772C8A31/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;General solution needed&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Setting the default format for numbers in SQL Editor should be possible. Currently, when we go to “SQL Admin Console”, there is only the possibility to change the default date &amp;amp; time format.&lt;/P&gt;&lt;P&gt;@Lindsay Olson​&amp;nbsp;@Prabakar Ammeappin​&amp;nbsp;@Werner Stinckens​&amp;nbsp;@Jose Gonzalez​&amp;nbsp;, please pass it on as feedback if possible.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1408i0A39772BC3BA4E93/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 01 Oct 2022 10:10:48 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2022-10-01T10:10:48Z</dc:date>
    <item>
      <title>Rounding in the databricks SQL editor</title>
      <link>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29783#M21490</link>
      <description>&lt;P&gt;In SQL editor (inside SQL experience), executing expressions 1 – 0.999 gives the result 0.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1409iDE1DD45D93495BB4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2022 10:06:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29783#M21490</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-10-01T10:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding in the databricks SQL editor</title>
      <link>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29784#M21491</link>
      <description>&lt;P&gt;The incorrect result is because of default rounding to format 0.00. We can implement the below solution to solve the problem. It must be applied to every individual query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Option 1: Edit Visualisation&lt;/B&gt;&lt;/P&gt;&lt;P&gt;After clicking Edit visualization, we can change the default Number format to 0.000&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1417iF0D4A570F752230B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;B&gt;Option 2: Format number&lt;/B&gt;&lt;/P&gt;&lt;P&gt;We can use the format_number function to override the default rounding format.&lt;B&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1420iC4BEE906772C8A31/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;General solution needed&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Setting the default format for numbers in SQL Editor should be possible. Currently, when we go to “SQL Admin Console”, there is only the possibility to change the default date &amp;amp; time format.&lt;/P&gt;&lt;P&gt;@Lindsay Olson​&amp;nbsp;@Prabakar Ammeappin​&amp;nbsp;@Werner Stinckens​&amp;nbsp;@Jose Gonzalez​&amp;nbsp;, please pass it on as feedback if possible.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1408i0A39772BC3BA4E93/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2022 10:10:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29784#M21491</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-10-01T10:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding in the databricks SQL editor</title>
      <link>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29785#M21492</link>
      <description>Sure @Hubert Dudek we'll test this internally and will take it to the team.</description>
      <pubDate>Sat, 01 Oct 2022 10:15:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29785#M21492</guid>
      <dc:creator>Prabakar</dc:creator>
      <dc:date>2022-10-01T10:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding in the databricks SQL editor</title>
      <link>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29786#M21493</link>
      <description>&lt;P&gt;Thank you @Prabakar Ammeappin​&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Oct 2022 18:39:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29786#M21493</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-10-02T18:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding in the databricks SQL editor</title>
      <link>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29787#M21494</link>
      <description>&lt;P&gt;Nice find&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 07:24:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/rounding-in-the-databricks-sql-editor/m-p/29787#M21494</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2022-10-04T07:24:31Z</dc:date>
    </item>
  </channel>
</rss>

