<?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 ingestion issue with THAI data in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/data-ingestion-issue-with-thai-data/m-p/108053#M42963</link>
    <description>&lt;P&gt;I have a use case where my file has data in Thai characters. The source location is azure blob storage, here files are stored in text format. I am using the following code to read the file, but when I am downloading the data from catalog it encloses data in quotes which I don't want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;input_df = (
            spark.read.format("text")
            .option("ignoreLeadingWhiteSpace", "false")
            .option("ignoreTrailingWhiteSpace", "false")
            .option("encoding", encoding)
            .option("keepUndefinedRows", True)
            .load(file_path)
            .withColumn("decoded_text", expr(f"regexp_replace(decode(value, '{encoding}'), '^\"|\"$', '')"))
            .drop("value")
            .withColumnRenamed("decoded_text", "value")
        )&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 31 Jan 2025 11:15:57 GMT</pubDate>
    <dc:creator>hardeeksharma</dc:creator>
    <dc:date>2025-01-31T11:15:57Z</dc:date>
    <item>
      <title>Data ingestion issue with THAI data</title>
      <link>https://community.databricks.com/t5/data-engineering/data-ingestion-issue-with-thai-data/m-p/108053#M42963</link>
      <description>&lt;P&gt;I have a use case where my file has data in Thai characters. The source location is azure blob storage, here files are stored in text format. I am using the following code to read the file, but when I am downloading the data from catalog it encloses data in quotes which I don't want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;input_df = (
            spark.read.format("text")
            .option("ignoreLeadingWhiteSpace", "false")
            .option("ignoreTrailingWhiteSpace", "false")
            .option("encoding", encoding)
            .option("keepUndefinedRows", True)
            .load(file_path)
            .withColumn("decoded_text", expr(f"regexp_replace(decode(value, '{encoding}'), '^\"|\"$', '')"))
            .drop("value")
            .withColumnRenamed("decoded_text", "value")
        )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 Jan 2025 11:15:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/data-ingestion-issue-with-thai-data/m-p/108053#M42963</guid>
      <dc:creator>hardeeksharma</dc:creator>
      <dc:date>2025-01-31T11:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Data ingestion issue with THAI data</title>
      <link>https://community.databricks.com/t5/data-engineering/data-ingestion-issue-with-thai-data/m-p/108177#M42989</link>
      <description>&lt;P&gt;Do the quotes exist in original data?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 18:48:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/data-ingestion-issue-with-thai-data/m-p/108177#M42989</guid>
      <dc:creator>Lakshay</dc:creator>
      <dc:date>2025-01-31T18:48:16Z</dc:date>
    </item>
  </channel>
</rss>

