skip to Main Content

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


  1. Here is the reference of Databricks supported data types.

    There is no varchar(x) type, use string instead.

    Login or Signup to reply.
  2. You can create table with varchar(x) datatype . please make sure you are using latest DBR version clusters . I have used 13.3 LTS (includes Apache Spark 3.4.1, Scala 2.12) DBR for below testing . enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search