<?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 Autoloader issue in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/autoloader-issue/m-p/53300#M29771</link>
    <description>&lt;P&gt;I'm trying to ingest data from Parquet files using Autoloader. Now, I have my custom schema, I don't want to infer the schema from the parquet files.&lt;/P&gt;&lt;P&gt;During readstream everything is fine. But during writestream, it is somehow inferring the schema from the files and I'm getting a schema mismatch error.&lt;/P&gt;&lt;P&gt;Any idea why it is happening? Help will be appreciated.&lt;/P&gt;&lt;P&gt;#&lt;/P&gt;</description>
    <pubDate>Tue, 21 Nov 2023 13:57:42 GMT</pubDate>
    <dc:creator>The_Demigorgan</dc:creator>
    <dc:date>2023-11-21T13:57:42Z</dc:date>
    <item>
      <title>Autoloader issue</title>
      <link>https://community.databricks.com/t5/data-engineering/autoloader-issue/m-p/53300#M29771</link>
      <description>&lt;P&gt;I'm trying to ingest data from Parquet files using Autoloader. Now, I have my custom schema, I don't want to infer the schema from the parquet files.&lt;/P&gt;&lt;P&gt;During readstream everything is fine. But during writestream, it is somehow inferring the schema from the files and I'm getting a schema mismatch error.&lt;/P&gt;&lt;P&gt;Any idea why it is happening? Help will be appreciated.&lt;/P&gt;&lt;P&gt;#&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 13:57:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/autoloader-issue/m-p/53300#M29771</guid>
      <dc:creator>The_Demigorgan</dc:creator>
      <dc:date>2023-11-21T13:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Autoloader issue</title>
      <link>https://community.databricks.com/t5/data-engineering/autoloader-issue/m-p/101115#M40548</link>
      <description>&lt;P&gt;In this case, please make sure you specify the schema explicitly when reading the Parquet files and do not specify any inference options.&lt;/P&gt;
&lt;P&gt;Something like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;spark.readStream.format("cloudFiles").schema(schema)...&lt;/LI-CODE&gt;
&lt;P&gt;If you want to more easily grab the schema, you can read with the batch reader and capture the schema:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;schema = spark.read.parquet("/your/path/here").schema&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Dec 2024 17:22:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/autoloader-issue/m-p/101115#M40548</guid>
      <dc:creator>cgrant</dc:creator>
      <dc:date>2024-12-05T17:22:43Z</dc:date>
    </item>
  </channel>
</rss>

