<?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: Delta External table in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64707#M6912</link>
    <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/616"&gt;@shan_chandra&lt;/a&gt;&amp;nbsp;THankyou, I just figured out same but i am glad you replied. Below i wrote and now i came and saw same thig. One thing I observed is that if files are already there in that location, create table wont work. It need to be empty, although we can use Insert into table statement and put data inside. Let me know if i am wrong here.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%sql&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt; &lt;SPAN&gt;TABLE&lt;/SPAN&gt;&lt;SPAN&gt; employee12345(&lt;/SPAN&gt;&lt;SPAN&gt;id&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;first_name &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;last_name &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;email &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;gender &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;salary &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;team &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;USING&lt;/SPAN&gt; &lt;SPAN&gt;DELTA&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LOCATION &lt;/SPAN&gt;&lt;SPAN&gt;'/dbfs/FileStore/extracted_files/employee_details/csv_files_1'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 26 Mar 2024 20:13:25 GMT</pubDate>
    <dc:creator>tajinder123</dc:creator>
    <dc:date>2024-03-26T20:13:25Z</dc:date>
    <item>
      <title>Delta External table</title>
      <link>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64699#M6908</link>
      <description>&lt;P&gt;Hi I am new to databricks and need some inputs.&lt;/P&gt;&lt;P&gt;I am trying to create Delta External table in databricks using existing path which contains csv files.&lt;/P&gt;&lt;P&gt;What i observed is below code will create &lt;SPAN&gt;EXTERNAL&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table but provider is&amp;nbsp;CSV.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-------------------------------&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt; &lt;SPAN&gt;TABLE&lt;/SPAN&gt;&lt;SPAN&gt; employee_csv1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;id&lt;/SPAN&gt; &lt;SPAN&gt;STRING&lt;/SPAN&gt;&lt;SPAN&gt;, first_name &lt;/SPAN&gt;&lt;SPAN&gt;STRING&lt;/SPAN&gt;&lt;SPAN&gt;, last_name &lt;/SPAN&gt;&lt;SPAN&gt;STRING&lt;/SPAN&gt;&lt;SPAN&gt;, email &lt;/SPAN&gt;&lt;SPAN&gt;STRING&lt;/SPAN&gt;&lt;SPAN&gt;, gender &lt;/SPAN&gt;&lt;SPAN&gt;STRING&lt;/SPAN&gt;&lt;SPAN&gt;, salary &lt;/SPAN&gt;&lt;SPAN&gt;DOUBLE&lt;/SPAN&gt;&lt;SPAN&gt;, team &lt;/SPAN&gt;&lt;SPAN&gt;STRING&lt;/SPAN&gt;&lt;SPAN&gt;)&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;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;header &lt;/SPAN&gt;&lt;SPAN&gt;=&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; &amp;nbsp;delimeter &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;","&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LOCATION &lt;/SPAN&gt;&lt;SPAN&gt;"${dataset.employee}/FileStore/extracted_files/employee_details/csv_files"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;---------------------------&lt;/P&gt;&lt;P&gt;Below code will create&amp;nbsp;&lt;SPAN&gt;MANAGED table and here provider is delta.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt; &lt;SPAN&gt;TABLE&lt;/SPAN&gt;&lt;SPAN&gt; employee123 &lt;/SPAN&gt;&lt;SPAN&gt;AS&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECT&lt;/SPAN&gt; &lt;SPAN&gt;*&lt;/SPAN&gt; &lt;SPAN&gt;FROM&lt;/SPAN&gt; &lt;SPAN&gt;csv&lt;/SPAN&gt;&lt;SPAN&gt;.`${dataset.employee}/FileStore/extracted_files/employee_details/csv_files`;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;---------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However i am trying to create EXTERNAL table where provider is&amp;nbsp;delta where it uses existing path as location.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anybody guide or provide syntax on it if its possible.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 18:37:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64699#M6908</guid>
      <dc:creator>tajinder123</dc:creator>
      <dc:date>2024-03-26T18:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Delta External table</title>
      <link>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64700#M6909</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102870"&gt;@tajinder123&lt;/a&gt;&amp;nbsp;- can you please modify the syntax as below to create as a delta table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CREATE TABLE employee123
USING DELTA
LOCATION '/path/to/existing/delta/files';&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 18:46:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64700#M6909</guid>
      <dc:creator>shan_chandra</dc:creator>
      <dc:date>2024-03-26T18:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Delta External table</title>
      <link>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64701#M6910</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/616"&gt;@shan_chandra&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou, it worked but i am getting below. Can you please tell what need to be added along with it to read column names from header. Its in first line.&lt;/P&gt;&lt;P&gt;Also please tell how can we add schema manually. Thanks,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You are trying to read a Delta table `spark_catalog`.`default`.`employee1234` that does not have any columns.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 19:04:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64701#M6910</guid>
      <dc:creator>tajinder123</dc:creator>
      <dc:date>2024-03-26T19:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Delta External table</title>
      <link>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64703#M6911</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102870"&gt;@tajinder123&lt;/a&gt;&amp;nbsp; -&amp;nbsp; could you please try this?&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CREATE TABLE employee123 (id STRING, first_name STRING, last_name STRING, email STRING, gender STRING, salary DOUBLE, team STRING)
USING DELTA
LOCATION '/path/to/existing/delta/files';&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 19:56:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64703#M6911</guid>
      <dc:creator>shan_chandra</dc:creator>
      <dc:date>2024-03-26T19:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delta External table</title>
      <link>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64707#M6912</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/616"&gt;@shan_chandra&lt;/a&gt;&amp;nbsp;THankyou, I just figured out same but i am glad you replied. Below i wrote and now i came and saw same thig. One thing I observed is that if files are already there in that location, create table wont work. It need to be empty, although we can use Insert into table statement and put data inside. Let me know if i am wrong here.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%sql&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt; &lt;SPAN&gt;TABLE&lt;/SPAN&gt;&lt;SPAN&gt; employee12345(&lt;/SPAN&gt;&lt;SPAN&gt;id&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;first_name &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;last_name &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;email &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;gender &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;salary &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;team &lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;USING&lt;/SPAN&gt; &lt;SPAN&gt;DELTA&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LOCATION &lt;/SPAN&gt;&lt;SPAN&gt;'/dbfs/FileStore/extracted_files/employee_details/csv_files_1'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 26 Mar 2024 20:13:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64707#M6912</guid>
      <dc:creator>tajinder123</dc:creator>
      <dc:date>2024-03-26T20:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delta External table</title>
      <link>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64824#M6913</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102870"&gt;@tajinder123&lt;/a&gt;&amp;nbsp;- can you please try the following&lt;/P&gt;
&lt;P&gt;1. dropping the table first and followed by&lt;/P&gt;
&lt;P&gt;2. dbutils.fs.rm to remove the files recursively from the dbfs location and&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. create or replace command to recreate the table.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 16:49:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/delta-external-table/m-p/64824#M6913</guid>
      <dc:creator>shan_chandra</dc:creator>
      <dc:date>2024-03-27T16:49:40Z</dc:date>
    </item>
  </channel>
</rss>

