<?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 Unable to Upcast DECIMAL Field in Autoloader in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/unable-to-upcast-decimal-field-in-autoloader/m-p/127506#M47990</link>
    <description>&lt;P&gt;I’m using Autoloader to read Parquet files and write them to a Delta table. I want to enforce a schema in which Column1 is defined as DECIMAL(10,2). However, in the Parquet files being ingested, Column1 is defined as DECIMAL(8,2).&lt;/P&gt;&lt;P&gt;When Autoloader reads the file, it considers this a schema mismatch and moves the column into _rescued_data.&lt;/P&gt;&lt;P&gt;I’ve tried specifying the schema explicitly using .schema() as well as using schemaHints, but neither approach resolves the issue — Autoloader still treats the field as incompatible and rescues it.&lt;/P&gt;&lt;P&gt;I've also tried with changing the values for&amp;nbsp;&lt;SPAN&gt;"cloudFiles.inferColumnTypes" and&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"cloudFiles.schemaEvolutionMode", but nothing works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it possible to upcast DECIMAL with autoloader? If so, how?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Aug 2025 21:19:13 GMT</pubDate>
    <dc:creator>yit</dc:creator>
    <dc:date>2025-08-05T21:19:13Z</dc:date>
    <item>
      <title>Unable to Upcast DECIMAL Field in Autoloader</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-upcast-decimal-field-in-autoloader/m-p/127506#M47990</link>
      <description>&lt;P&gt;I’m using Autoloader to read Parquet files and write them to a Delta table. I want to enforce a schema in which Column1 is defined as DECIMAL(10,2). However, in the Parquet files being ingested, Column1 is defined as DECIMAL(8,2).&lt;/P&gt;&lt;P&gt;When Autoloader reads the file, it considers this a schema mismatch and moves the column into _rescued_data.&lt;/P&gt;&lt;P&gt;I’ve tried specifying the schema explicitly using .schema() as well as using schemaHints, but neither approach resolves the issue — Autoloader still treats the field as incompatible and rescues it.&lt;/P&gt;&lt;P&gt;I've also tried with changing the values for&amp;nbsp;&lt;SPAN&gt;"cloudFiles.inferColumnTypes" and&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"cloudFiles.schemaEvolutionMode", but nothing works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it possible to upcast DECIMAL with autoloader? If so, how?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2025 21:19:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-upcast-decimal-field-in-autoloader/m-p/127506#M47990</guid>
      <dc:creator>yit</dc:creator>
      <dc:date>2025-08-05T21:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Upcast DECIMAL Field in Autoloader</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-upcast-decimal-field-in-autoloader/m-p/127514#M47994</link>
      <description>&lt;P&gt;Hi Yit,&lt;/P&gt;&lt;P&gt;To potentially simplify your issue, why not read this column as String in your stream and then cast it to DECIMAL(10, 2) afterwards? That should eliminate the rescue behaviour.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Kerem Durak&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2025 23:02:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-upcast-decimal-field-in-autoloader/m-p/127514#M47994</guid>
      <dc:creator>kerem</dc:creator>
      <dc:date>2025-08-05T23:02:24Z</dc:date>
    </item>
  </channel>
</rss>

