how to mapping phoenix table for hive
来源:互联网 发布:像instagram的软件 编辑:程序博客网 时间:2024/05/29 17:50
原文出处:
https://community.hortonworks.com/questions/1558/bestoptimized-way-to-move-data-from-phoenix-to-hiv.html
see a simple example below:
- PHOENIX:
- CREATE TABLE TEST(
- ID VARCHARnotnull,
- TEXT VARCHAR
- CONSTRAINT PK PRIMARY KEY(ID)
- );
- HIVE:
- CREATE EXTERNAL TABLE TEST(IDint, TEXTstring)
- STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
- WITH SERDEPROPERTIES("hbase.columns.mapping"=":key,0:TEXT")
- TBLPROPERTIES ("hbase.table.name"="TEST");
A more complex example, with composite key and numeric data types:
- PHOENIX:
- CREATE TABLE TEST2(
- ID1 VARCHAR NOT NULL,
- ID2 VARCHAR NOT NULL,
- NUM DOUBLE,
- TEXT VARCHAR
- CONSTRAINT PK PRIMARY KEY(ID1, ID2)
- );
- HIVE:
- CREATE EXTERNAL TABLE TEST2(KEY STRUCT<ID1:STRING, ID2:STRING>, NUM DOUBLE, TEXT STRING)
- ROW FORMAT DELIMITED
- COLLECTION ITEMS TERMINATED BY'\u0000'
- STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
- WITH SERDEPROPERTIES("hbase.columns.mapping"=":key,0:NUM,0:TEXT",
- "hbase.table.default.storage.type"="binary")
- TBLPROPERTIES("hbase.table.name"="TEST2");
0 0
- how to mapping phoenix table for hive
- How To determine DDIC Check Table, Domain and Get Table Field Text Data For Value?
- spark JavaSQLPageViewanalyzer for hive table
- How to tell RNA-seq library type of strand-specific for RNA-seq data (for reads mapping by Tophat)
- NHiberante How to mapping a simple entity?
- Jdeveloper: How to bind ArrayList to a Table for data controls
- How to use partition table
- hive删除表错误:FAILED: SemanticException Unable to fetch table user_info. For direct MetaStore DB connect
- 怎样给Oracle 数据库的表加触发器: how to add trigger for Oracle Database table
- MAPPING TABLE
- Phoenix Salted Table
- UML Model/Relation Db Table Mapping Design For LiteMda - Draft
- how to kill hive server and start
- How-to: Install hive with mysql metastore
- How to configue session timeout in Hive
- How-To Guide for Descriptors
- How to generate Hibernate mapping files & annotation with Hibernate Tools
- How to generate Hibernate mapping files & annotation with Hibernate Tools
- 【android笔记】移除activity切换效果,取消闪烁
- overflow失效的一种情况
- Java中 HashSet与HasnMap区别和方法
- validate binary search tree
- android 如何从网络获取一张图片
- how to mapping phoenix table for hive
- ibatis - sqlMapConfig.xml配置文件详解
- 解决Sublime Text窗口标签栏不见问题
- Xcode重构功能
- Your build settings specify a provisioning profile with the UUID, no provisioning profile was
- Servlet详解
- tomcat运行多个web app
- ORA-04063: view "DAILY.TMP_TBX_100_0_S4" 有错误
- jquery加载HTML片段