<?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 Data type not shown correctly in SQL editor in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/data-type-not-shown-correctly-in-sql-editor/m-p/10650#M5791</link>
    <description>&lt;P&gt;When selecting from a table in the SQL editor it doesn't always preview the actual data type that the column is. e.g. I have a decimal() data type in one of my tables and when I select it it previews to a float with 2 decimals (which is different from what the type actually is when I go to check it out in the Data explorer). When you hit "preview visualisation data" the pop up window also shows the correct data type (i.e. decimal(38,9) and not float()). It also says that "The visualisation data matches what is displayed in the editor and the results" which, as you can see in the pic below, is not the case.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 09:29:13 GMT</pubDate>
    <dc:creator>alwinsa</dc:creator>
    <dc:date>2023-01-26T09:29:13Z</dc:date>
    <item>
      <title>Data type not shown correctly in SQL editor</title>
      <link>https://community.databricks.com/t5/data-engineering/data-type-not-shown-correctly-in-sql-editor/m-p/10650#M5791</link>
      <description>&lt;P&gt;When selecting from a table in the SQL editor it doesn't always preview the actual data type that the column is. e.g. I have a decimal() data type in one of my tables and when I select it it previews to a float with 2 decimals (which is different from what the type actually is when I go to check it out in the Data explorer). When you hit "preview visualisation data" the pop up window also shows the correct data type (i.e. decimal(38,9) and not float()). It also says that "The visualisation data matches what is displayed in the editor and the results" which, as you can see in the pic below, is not the case.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 09:29:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/data-type-not-shown-correctly-in-sql-editor/m-p/10650#M5791</guid>
      <dc:creator>alwinsa</dc:creator>
      <dc:date>2023-01-26T09:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Data type not shown correctly in SQL editor</title>
      <link>https://community.databricks.com/t5/data-engineering/data-type-not-shown-correctly-in-sql-editor/m-p/10651#M5792</link>
      <description>&lt;P&gt;Hi @Alva Winsa​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where do you see that the data type is changing? That might be a bug that needs to be reported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing that can happen is the SQL editor output will automatically round to the nearest two decimals as shown in the screenshot, this can be changed by editing the table results and changing the number format to include more decimals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2023-01-26 at 7.27.43 AM"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/787iA016ABC9A1990837/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-01-26 at 7.27.43 AM" alt="Screen Shot 2023-01-26 at 7.27.43 AM" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 14:31:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/data-type-not-shown-correctly-in-sql-editor/m-p/10651#M5792</guid>
      <dc:creator>LandanG</dc:creator>
      <dc:date>2023-01-26T14:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Data type not shown correctly in SQL editor</title>
      <link>https://community.databricks.com/t5/data-engineering/data-type-not-shown-correctly-in-sql-editor/m-p/10652#M5793</link>
      <description>&lt;P&gt;Hey thanks for your response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That definitely seems like what's happening! I'm new to Databricks -- where can I find that editor?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my problem was actually two-pronged but I only outlined part of the problem above, which you seem to have solved!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other part of the problem is that I'm casting this column as a decimal (38,32) in dbt. And seemingly in dbt that works well and gives me the expected results. However, in Databricks the column is altered to decimal(38,9). How can I tackle this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Alva&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 14:46:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/data-type-not-shown-correctly-in-sql-editor/m-p/10652#M5793</guid>
      <dc:creator>alwinsa</dc:creator>
      <dc:date>2023-01-26T14:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Data type not shown correctly in SQL editor</title>
      <link>https://community.databricks.com/t5/data-engineering/data-type-not-shown-correctly-in-sql-editor/m-p/10653#M5794</link>
      <description>&lt;P&gt;Hi @Alva Winsa​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a couple of screenshots which hopefully shows where you can edit this parameter.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2023-01-26 at 7.57.51 AM"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/788i75A900C44CE52DF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-01-26 at 7.57.51 AM" alt="Screen Shot 2023-01-26 at 7.57.51 AM" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2023-01-26 at 8.00.11 AM"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/803i31665B9692BC5420/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-01-26 at 8.00.11 AM" alt="Screen Shot 2023-01-26 at 8.00.11 AM" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/790i289B8B5DB7C7C068/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen" alt="Screen" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as the dbt casting problem, I'll see if I can find anything and get back to you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 15:01:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/data-type-not-shown-correctly-in-sql-editor/m-p/10653#M5794</guid>
      <dc:creator>LandanG</dc:creator>
      <dc:date>2023-01-26T15:01:54Z</dc:date>
    </item>
  </channel>
</rss>

