zoukankan      html  css  js  c++  java
  • 大数据学习——hive显示命令

    1 show databases;
    2 desc t_partition001;
    3 desc extended t_partition002;
    4 desc formatted  t_partition002;
    5 !clear;
    6 !ls;
    7 dfs -ls /;

    2 DML操作

    load

    load data local inpath '/root/hivedata/t_partitioned' into table t_partition001 partition(country="Japan");
    
    load data inpath '/t_partitioned' into table t_partition001 partition(country="Japan");

    overwrite

    load data local inpath '/root/hivedata/stu_partition2' overwrite into table stu_partition partition(city="China");

    like

    create table t_1 like stu_partition;

    insert 

    insert overwrite table t_1 partition(city='Japan') select id,name,age from stu_partition;
    
    -- 导出数据
    insert overwrite local directory '/root/hivedata/data' select * from student;
    insert overwrite directory '/root/hivedata/data' select * from student;

    3 multi insert 多重插入

    4 Dynamic partition inserts  动态分区插入

     5 自动分区模式

    set hive.exec.dynamic.partition.mode=nonstrict;

  • 相关阅读:
    TCP/IP 网路基础
    三、Django之请求与响应-Part 1
    二、Django快速安装
    Linux 优化详解
    缓存的正确使用方式
    HTML从入门到放弃
    Ansible开发之路
    程序猿数据库学习指南
    MySQL错误代码大全
    Python之网络编程
  • 原文地址:https://www.cnblogs.com/feifeicui/p/10277587.html
Copyright © 2011-2022 走看看