I don't think this feature is actually supported for Parquet files. How about defining a SQL view that includes a COALESCE(TRANAMT, 1.77) column expression?

On 2023/09/06 09:23, Prabhakar Bhosale wrote:
Hi Team,
I am trying to add a column with default into a parquet file by way of
defining a schema for the folder after enabling the metostore. I used the
following query to provide a schema. but the new column always returns null
value instead of giving default value. I am using drill 1.21.1

ANALYZE TABLE   table(dfs.tmp.`TESTCUST_1`
(type=>'parquet',schema=>'inline=(`TRANID`
VARCHAR,
     `CUST_ID` VARCHAR,
     `ACTID` VARCHAR,
     `TRANAMT` FLOAT NOT NULL properties {`DEFAULT` = `1.77`})')) REFRESH
METADATA;

REgards
Prabhakar


Reply via email to