Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to use /u0001 Delimiter

avatar
Rising Star

Hi Team,

Alter /u0001 delimiter is not working. Iam getting NULL value. Please tell me how to make it work

5 REPLIES 5

avatar

@suresh krish

Can you please let me know the structure of the Hive table and alter being used?

Thanks and Regards,

Sindhu

avatar
Rising Star

Thanks for your response

Hive table structure :::

# Detailed Table Information

Database: database1

Owner: nred

CreateTime: Thu Jun 09 05:07:28 EDT 2016

LastAccessTime: UNKNOWN

Protect Mode: None

Retention: 0

Location: hdfs://dshdp-dev-cluster/apps/hive/warehouse/neela.db/<table_name>

Table Type: MANAGED_TABLE

Table Parameters:

COLUMN_STATS_ACCURATE true

numFiles 1

totalSize 32

transient_lastDdlTime 1465463347

# Storage Information

SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe

InputFormat: org.apache.hadoop.mapred.TextInputFormat

OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

Compressed:

No Num Buckets: -1

Bucket Columns: []

Sort Columns: []

Storage Desc Params:

field.delim |

serialization.format

Alter the delimitter

Alter command :

hive> alter table <table_name> > set serde 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES ('field.delim' = 'u0001');

avatar
Rising Star

Any thoughts Sindhu ??

avatar
Expert Contributor

@suresh,

Can you try with '\u0001' instead?

avatar
Expert Contributor

@suresh krish Try this

alter table <table_name> > set serde 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES ('field.delim' = '\001');

I guess hive internally converts '\001' --> \u0001