美文网首页
hive字段分隔符和数组分隔符

hive字段分隔符和数组分隔符

作者: yayooo | 来源:发表于2020-12-03 16:31 被阅读0次

    hive默认字段分隔符为 " \001",常用。
    数组分隔符常用 " \002"。
    示例:

    CREATE TABLE employees (
        name STRING,
        salary FLOAT,
        subordinates ARRAY<STRING>,
        deductions MAP<STRING, FLOAT>,
        address STRUCT<street:STRING, city:STRING, state:STRING, zip:INT>
    )
    ROW FORMAT DELIMITED
    FIELDS TERMINATED BY '\001'
    COLLECTION ITEMS TERMINATED BY '\002'
    MAP KEYS TERMINATED BY '\003'
    LINES TERMINATED BY '\n'
    STORED AS TEXTFILE;
    

    相关文章

      网友评论

          本文标题:hive字段分隔符和数组分隔符

          本文链接:https://www.haomeiwen.com/subject/ktomwktx.html