How to specify custom string for NULL values in Hive table stored as text? How to specify custom string for NULL values in Hive table stored as text? hadoop hadoop

How to specify custom string for NULL values in Hive table stored as text?


Use this property while creating the tableCREATE TABLE IF NOT EXISTS abc()ROW FORMAT DELIMITEDFIELDS TERMINATED BY '|'STORED AS TEXTFILETBLPROPERTIES ("serialization.null.format"="")


oh, sorry. I read your question not clear

If you want to represented empty string instead of '\N', you can using COALESCE function:

INSERT OVERWRITE DIRECTORY 's3://bucket/result/' SELECT NULL, COALESCE(NULL,"")FROM data_table;