ngy0217

进入hbase命令行:任意目录

    hbase shell   

 

进入命令行后,hbase查看表:list

查看表中所有数据:scan \'table_name\'

    如:scan \'dim_user_city\'

 

创建表:

    create \'表名\',\'别名\'

    create \'dim_user_firstcity\',\'cx\'

    create \'dim_user_city\',\'cx\'

    create \'dim_user_guid\',\'cx\'

    create \'user_credit_status\',\'cx\'

    

 

查询数据:

  get \'表名\',\'rowkey\'

  如:ge \'dim_user_city\',\'00321:420100\'

 

插入数据:

    put \'表名\',\'rowkey\',\'表别名:字段名\',‘字段值’

    如:put \'dim_user_city\',\'00321:420100\',\'cx:count\',1

 

清空表数据:

truncate  \'user_credit_status\'

分类:

技术点:

相关文章:

  • 2021-10-16
  • 2022-02-03
  • 2022-01-11
  • 2021-05-26
  • 2022-01-05
  • 2021-06-01
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2021-12-10
  • 2022-01-14
  • 2021-12-25
相关资源
相似解决方案