Can a table be created in Azure Databricks pointed to azure storage account in delta format with fixed varchar(x)
and timestamp_ntz
(no time zone) data type ?
I am using a script similar to below and it doesn’t like the varchar(x)
datatype.
CREATE OR REPLACE TABLE schm.tbl
USING
DELTA
LOCATION
'abfss://[email protected]/path/'
(
col1 VARCHAR(150),
col2 VARCHAR(6),
col3 INT,
col4 VARCHAR(30),
col5 TIMESTAMP_NTZ
)
TBLPROPERTIES ('delta.feature.timestampNtz' = 'supported');
2
Answers
Here is the reference of Databricks supported data types.
There is no
varchar(x)
type, usestring
instead.You can create table with
varchar(x)
datatype . please make sure you are using latest DBR version clusters . I have used13.3 LTS (includes Apache Spark 3.4.1, Scala 2.12)
DBR for below testing .