phoenix-hbase 使用

建表命令

CREATE TABLE IF NOT EXISTS "person_mul"(
"ROW" varchar primary key, //主键,必须存在
"info"."ac" varchar, //info对应hbase的列族,ac对应列名
"info"."courseType" varchar,
......
);

数据文件导入phoenix表

psql.py -t test_mid ubuntu:2181 /home/zzd/soft/code/test.txt

SQL语法关键字

SELECT=’select’; FROM=’from’; USING=’using’; WHERE=’where’; NOT=’not’;

AND=’and’;OR=’or’;NULL=’null’;TRUE=’true’;FALSE=’false’;LIKE=’like’;AS=’as’;

OUTER=’outer’;ON=’on’;IN=’in’;GROUP=’group’;HAVING=’having’;ORDER=’order’;BY=’by’;ASC=’asc’;DESC=’desc’;

NULLS=’nulls’;LIMIT=’limit’;FIRST=’first’;LAST=’last’;DATA=’data’;CASE=’case’;WHEN=’when’;THEN=’then’;ELSE=’else’;

END=’end’;EXISTS=’exists’;IS=’is’;FIRST=’first’;DISTINCT=’distinct’;JOIN=’join’;INNER=’inner’;LEFT=’left’;RIGHT=’right’;FULL=’full’;BETWEEN=’between’;

UPSERT=’upsert’;INTO=’into’;VALUES=’values’;DELETE=’delete’;CREATE=’create’;DROP=’drop’;PRIMARY=’primary’;KEY=’key’;

ALTER=’alter’;COLUMN=’column’;TABLE=’table’;ADD=’add’;SPLIT=’split’;EXPLAIN=’explain’;VIEW=’view’;IF=’if’; CONSTRAINT=’constraint’;

数据类型支持

integer type
unsigned_int type
bigint type
unsigned_long type
tinyint type
unsigned_tinyint type
smallint type
unsigned_smallint type

float type
unsigned_float type
double type
unsigned_double type
decimal type

boolean type

time type
date type
timestamp type
unsigned_time type
unsigned_date type
unsigned_timestamp type

varchar type
char type
binary type
varbinary type

array

原文地址:https://www.cnblogs.com/fengzzi/p/10036647.html