Wednesday, May 19, 2021

create external table with data in csv

 create external table  if not exists my_db.mytable(
  name string,
 age int)
COMMENT 'Example table'
ROW FORMAT DELIMITED
FILEDS TERMINATED BY ','
SOTRED AS TEXTFILE
LOCATION '/data/warehouse/employee_data'
tableproperties("skip.header.line.count"="1")

No comments:

Post a Comment

Recent Post

Databricks Delta table merge Example

here's some sample code that demonstrates a merge operation on a Delta table using PySpark:   from pyspark.sql import SparkSession # cre...