<?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: Facing issue while creating Delta Live Table on top of csv file in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/11434#M6413</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the above approach but getting below error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;org.apache.spark.sql.AnalysisException: Unable to process statement of type: 'CreateTempViewUsing'. DLT currently only accepts 'CREATE TEMPORARY LIVE VIEW', 'CREATE OR REFRESH LIVE TABLE', 'APPLY CHANGES INTO', and 'SET' statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find attached image file for error message.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2022 11:40:31 GMT</pubDate>
    <dc:creator>Manasi_Sarang</dc:creator>
    <dc:date>2022-08-22T11:40:31Z</dc:date>
    <item>
      <title>Facing issue while creating Delta Live Table on top of csv file</title>
      <link>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/11432#M6411</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I am trying to create Delta Live Table on top of csv file using below syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OR REFRESH LIVE TABLE employee_bronze_dlt&lt;/P&gt;&lt;P&gt;COMMENT "The bronze employee dataset, ingested from /mnt/lakehouse/PoC/DLT/Source/."&lt;/P&gt;&lt;P&gt;AS SELECT * FROM csv.`/mnt/lakehouse/PoC/DLT/Source/Employee.csv`;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table is getting created but headers are appearing as part of data in table as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1656i5D563B83D1D2AB13/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;Can you please let me know what needs to be added in table creation definition to identify first row in data as header?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 12:09:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/11432#M6411</guid>
      <dc:creator>Manasi_Sarang</dc:creator>
      <dc:date>2022-08-03T12:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Facing issue while creating Delta Live Table on top of csv file</title>
      <link>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/11433#M6412</link>
      <description>&lt;P&gt;Hi, let's try the next : &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CREATE TEMPORARY VIEW vw_employee
USING CSV
OPTIONS (path "/mnt/lakehouse/PoC/DLT/Source/Employee.csv", header "true");
&amp;nbsp;
CREATE OR REFRESH LIVE TABLE employee_bronze_dlt
COMMENT "The bronze employee dataset, ingested from /mnt/lakehouse/PoC/DLT/Source/."
AS SELECT * FROM vw_employee;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 16:06:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/11433#M6412</guid>
      <dc:creator>artsheiko</dc:creator>
      <dc:date>2022-08-03T16:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Facing issue while creating Delta Live Table on top of csv file</title>
      <link>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/11434#M6413</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the above approach but getting below error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;org.apache.spark.sql.AnalysisException: Unable to process statement of type: 'CreateTempViewUsing'. DLT currently only accepts 'CREATE TEMPORARY LIVE VIEW', 'CREATE OR REFRESH LIVE TABLE', 'APPLY CHANGES INTO', and 'SET' statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find attached image file for error message.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 11:40:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/11434#M6413</guid>
      <dc:creator>Manasi_Sarang</dc:creator>
      <dc:date>2022-08-22T11:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Facing issue while creating Delta Live Table on top of csv file</title>
      <link>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/36451#M26128</link>
      <description>&lt;P&gt;Facing similar issue&lt;/P&gt;&lt;P&gt;"message": "Unable to process top-level query. DLT currently only accepts 'CREATE TEMPORARY LIVE VIEW', 'CREATE OR REFRESH LIVE TABLE', 'APPLY CHANGES INTO', and 'SET' statements.".&lt;/P&gt;&lt;P&gt;Please let me know if you have got any luck.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 05:48:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/36451#M26128</guid>
      <dc:creator>AbhiJ</dc:creator>
      <dc:date>2023-06-30T05:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Facing issue while creating Delta Live Table on top of csv file</title>
      <link>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/36457#M26131</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/77750"&gt;@Manasi_Sarang&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I believe the Delta is unable to infer the schema as you are using select statement to read entire content from csv file and I think the inferschema won't work here.&amp;nbsp; Instead you can try to create a temp live table or live view with the below options and read from that table or view.&amp;nbsp;&lt;/P&gt;&lt;P&gt;USING csv OPTIONS (path "./file.csv", header "true", inferSchema "true")&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 08:08:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/facing-issue-while-creating-delta-live-table-on-top-of-csv-file/m-p/36457#M26131</guid>
      <dc:creator>pvignesh92</dc:creator>
      <dc:date>2023-06-30T08:08:17Z</dc:date>
    </item>
  </channel>
</rss>

