<?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: PARSE_SYNTAX_ERROR creating view from CSV in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/parse-syntax-error-creating-view-from-csv/m-p/38834#M26783</link>
    <description>&lt;P&gt;I finally used the managed table creation and works perfectly. So I don't need to schedule. I leave the code here in case is of any use for someone:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%sql&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt; &lt;SPAN&gt;TABLE&lt;/SPAN&gt; &lt;SPAN&gt;IF&lt;/SPAN&gt; &lt;SPAN&gt;NOT&lt;/SPAN&gt; &lt;SPAN&gt;EXISTS&lt;/SPAN&gt;&lt;SPAN&gt; esprosilver.XXXX.encuestas_talleres&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;USING&lt;/SPAN&gt;&lt;SPAN&gt; CSV&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OPTIONS&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; path &lt;/SPAN&gt;&lt;SPAN&gt;"abfss://landing@esproanalyticscenterdl.dfs.core.windows.net/oracle-dwh/encuestas_talleres/encuestas_talleres.csv"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; header &lt;/SPAN&gt;&lt;SPAN&gt;"true"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; inferSchema &lt;/SPAN&gt;&lt;SPAN&gt;"true"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; delimiter &lt;/SPAN&gt;&lt;SPAN&gt;";"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;format&lt;/SPAN&gt; &lt;SPAN&gt;"csv"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Thank you very much Mo for your time and giving me the idea of using tables. Have a great day!&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 01 Aug 2023 11:30:08 GMT</pubDate>
    <dc:creator>DaniW</dc:creator>
    <dc:date>2023-08-01T11:30:08Z</dc:date>
    <item>
      <title>PARSE_SYNTAX_ERROR creating view from CSV</title>
      <link>https://community.databricks.com/t5/data-engineering/parse-syntax-error-creating-view-from-csv/m-p/38816#M26773</link>
      <description>&lt;P&gt;Hello, if i run this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;%sql&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;CREATE OR REPLACE VIEW esprosilver.xxx.encuestas_talleres&lt;/DIV&gt;&lt;DIV&gt;AS&lt;/DIV&gt;&lt;DIV&gt;SELECT * FROM CSV.`abfss://landing@esproanalyticscenterdl.dfs.core.windows.net/oracle-dwh/encuestas_talleres/encuestas_talleres.csv`&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It creates the view in unity catalog, but places all data in a column _c0. so I have to tell it that it has headers. But if I run this query:&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;%sql&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;CREATE OR REPLACE VIEW esprosilver.xxxx.encuestas_talleres&lt;/DIV&gt;&lt;DIV&gt;USING csv&lt;/DIV&gt;&lt;DIV&gt;OPTIONS (&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; path "abfss://landing@esproanalyticscenterdl.dfs.core.windows.net/oracle-dwh/encuestas_talleres/encuestas_talleres.csv",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; header = "true",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; inferSchema "true",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; mode "FAILFAST")&lt;/DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;it returns this error:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;ParseException&lt;/SPAN&gt;: [PARSE_SYNTAX_ERROR] Syntax error at or near 'USING'(line 2, pos 0) == SQL == CREATE OR REPLACE VIEW esprosilver.realeseguros_dwh.encuestas_talleres&lt;BR /&gt;USING csv&lt;BR /&gt;^^^&lt;BR /&gt;OPTIONS ( path "abfss:REDACTED_LOCAL_PART@esproanalyticscenterdl.dfs.core.windows.net/oracle-dwh/encuestas_talleres/encuestas_talleres.csv", header = "true", inferSchema "true", mode "FAILFAST")&lt;BR /&gt;&lt;BR /&gt;Can someone help me fix it? Thank you in advance&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Aug 2023 08:26:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parse-syntax-error-creating-view-from-csv/m-p/38816#M26773</guid>
      <dc:creator>DaniW</dc:creator>
      <dc:date>2023-08-01T08:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: PARSE_SYNTAX_ERROR creating view from CSV</title>
      <link>https://community.databricks.com/t5/data-engineering/parse-syntax-error-creating-view-from-csv/m-p/38817#M26774</link>
      <description>&lt;P&gt;I forgot to mention that the csv delimiter is ';'&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 08:33:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parse-syntax-error-creating-view-from-csv/m-p/38817#M26774</guid>
      <dc:creator>DaniW</dc:creator>
      <dc:date>2023-08-01T08:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: PARSE_SYNTAX_ERROR creating view from CSV</title>
      <link>https://community.databricks.com/t5/data-engineering/parse-syntax-error-creating-view-from-csv/m-p/38825#M26780</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello Mo,&lt;/P&gt;&lt;P&gt;Thank you for the prompt reply. I require the data and schema to be accessible to all users at all times. Considering this, I'm thinking of creating a managed table that would function similarly to a view. If I create a table first and then a view based on it, any changes to the CSV file would necessitate re-creating the table. Right?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 09:47:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parse-syntax-error-creating-view-from-csv/m-p/38825#M26780</guid>
      <dc:creator>DaniW</dc:creator>
      <dc:date>2023-08-01T09:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: PARSE_SYNTAX_ERROR creating view from CSV</title>
      <link>https://community.databricks.com/t5/data-engineering/parse-syntax-error-creating-view-from-csv/m-p/38834#M26783</link>
      <description>&lt;P&gt;I finally used the managed table creation and works perfectly. So I don't need to schedule. I leave the code here in case is of any use for someone:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%sql&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt; &lt;SPAN&gt;TABLE&lt;/SPAN&gt; &lt;SPAN&gt;IF&lt;/SPAN&gt; &lt;SPAN&gt;NOT&lt;/SPAN&gt; &lt;SPAN&gt;EXISTS&lt;/SPAN&gt;&lt;SPAN&gt; esprosilver.XXXX.encuestas_talleres&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;USING&lt;/SPAN&gt;&lt;SPAN&gt; CSV&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OPTIONS&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; path &lt;/SPAN&gt;&lt;SPAN&gt;"abfss://landing@esproanalyticscenterdl.dfs.core.windows.net/oracle-dwh/encuestas_talleres/encuestas_talleres.csv"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; header &lt;/SPAN&gt;&lt;SPAN&gt;"true"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; inferSchema &lt;/SPAN&gt;&lt;SPAN&gt;"true"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; delimiter &lt;/SPAN&gt;&lt;SPAN&gt;";"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;format&lt;/SPAN&gt; &lt;SPAN&gt;"csv"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Thank you very much Mo for your time and giving me the idea of using tables. Have a great day!&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Aug 2023 11:30:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parse-syntax-error-creating-view-from-csv/m-p/38834#M26783</guid>
      <dc:creator>DaniW</dc:creator>
      <dc:date>2023-08-01T11:30:08Z</dc:date>
    </item>
  </channel>
</rss>

