Delta External table

tajinder123
New Contributor II

Hi I am new to databricks and need some inputs.

I am trying to create Delta External table in databricks using existing path which contains csv files.

What i observed is below code will create EXTERNAL table but provider is CSV.

-------------------------------

CREATE TABLE employee_csv1
(id STRING, first_name STRING, last_name STRING, email STRING, gender STRING, salary DOUBLE, team STRING)
USING CSV
OPTIONS(
   header = "true",
   delimeter  = ","
)
LOCATION "${dataset.employee}/FileStore/extracted_files/employee_details/csv_files"

---------------------------

Below code will create MANAGED table and here provider is delta.

------------------------------

CREATE TABLE employee123 AS
SELECT * FROM csv.`${dataset.employee}/FileStore/extracted_files/employee_details/csv_files`;

---------------------------

However i am trying to create EXTERNAL table where provider is delta where it uses existing path as location.

Can anybody guide or provide syntax on it if its possible.