win7下的Hosts
C:\Windows\System32\drivers\etc
phoenix数据类型
date ( > < =)
number to_char(cloumn)
》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》
sqoop导入数据
sqoop import -D sqoop.hbase.add.row.key=true --connect jdbc:oracle:thin:@10.1.10.61:1521:ORCL --username YY_YY --password 12345678 --table YY_YY_STEP_CFB_HISTORY --hbase-create-table --hbase-table YY_YY_STEP_CFB_HISTORY --hbase-row-key SJBBH,DWBH,CFBH --column-family cf --where "ROWNUM<1000" -m 1
sqoop import -D sqoop.hbase.add.row.key=true --connect jdbc:oracle:thin:@10.1.10.61:1521:ORCL --username YY_YY --password 12345678 --table YY_YY_STEP_CFB_HISTORY_BAK --hbase-table YY_YY_STEP_CFB_HISTORY --hbase-row-key SJBBH,DWBH,CFBH --column-family cf -m 20
phoenix映射表
create table if not exists YY_YY_STEP_CFB_HISTORY (row varchar not null,"cf".CFBH varchar,"cf".DWBH varchar,"cf".SJBBH varchar,"cf".HJFSSJ varchar,"cf".YWSZXZQH varchar,"cf".BZBBH varchar,"cf".YLJGMC varchar,"cf".KBHBQ varchar,"cf".YSBH varchar,"cf".YSMC varchar,"cf".BLH varchar,"cf".CWH varchar,"cf".HZBH varchar,"cf".HZMC varchar,"cf".HZNL varchar,"cf".XB varchar,"cf".FB varchar,"cf".HZKH varchar,"cf".CJSJ varchar,"cf".CFLX varchar,"cf".HBFL varchar,"cf".TSQKSM varchar,"cf".STATUS char(1),"cf".EXTIME varchar,"cf".ERRCODE varchar,"cf".ERRM varchar,"cf".CSRQ varchar constraint PK primary key(row) )
查询类型
select trunc(to_date(br,'yyyy-MM-DD hh:mm:ss'),'DAY') from v1 group by trunc(to_date(br,'yyyy-MM-DD hh:mm:ss'),'DAY');
======================================================================================================
数据中心查询语句(nosql)
select tc.dwbh as dwbh, trunc(to_date(tc.cjsj,'yyyy-MM-DD hh:mm:ss'),'DAY') as MAKETIME, sum(1) as cfb from yy_yy_step_cfb_history tc where 1 = 1 and DWBH in ('4453','4454', '7148','4452','7145', '4459','7144','4458','4457','4451') and CJSJ >= '2014-11' and CJSJ < '2014-12' group by tc.dwbh, trunc(to_date(tc.cjsj,'yyyy-MM-DD hh:mm:ss'),'DAY') order by trunc(to_date(tc.cjsj,'yyyy-MM-DD hh:mm:ss'),'DAY')
select tc.dwbh as dwbh, trunc(to_date(tc.cjsj,'yyyy-MM-DD hh:mm:ss'),'DAY') as MAKETIME, sum(1) as cfb from yy_yy_step_cfb_history tc where 1 = 1 group by tc.dwbh, trunc(to_date(tc.cjsj,'yyyy-MM-DD hh:mm:ss'),'DAY') order by trunc(to_date(tc.cjsj,'yyyy-MM-DD hh:mm:ss'),'DAY')
select tc.dwbh as dwbh, trunc(to_date(tc.cjsj,'yyyy-MM-DD hh:mm:ss'),'DAY') as MAKETIME, sum(1) as cfb from yy_yy_step_cfb_history tc where 1 = 1 group by tc.dwbh, trunc(to_date(tc.cjsj,'yyyy-MM-DD hh:mm:ss'),'DAY') order by trunc(to_date(tc.cjsj,'yyyy-MM-DD hh:mm:ss'),'DAY');
;
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."CFBH" IS '处方编号';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."DWBH" IS '单位编号';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."SJBBH" IS '数据版本号';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."HJFSSJ" IS '环节发生时间';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."YWSZXZQH" IS '业务所在行政区划';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."BZBBH" IS '标准版本号';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."YLJGMC" IS '医疗机构名称';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."KBHBQ" IS '科别或病区';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."YSBH" IS '医生编号';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."YSMC" IS '医生姓名';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."BLH" IS '病历号';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."CWH" IS '床位号';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."HZBH" IS '患者编号';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."HZMC" IS '患者姓名';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."HZNL" IS '患者年龄';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."XB" IS '性别';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."FB" IS '费别';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."HZKH" IS '患者卡号';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."CJSJ" IS '出具时间';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."CFLX" IS '处方类型';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."HBFL" IS '特殊用药说明';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."TSQKSM" IS '特殊情况说明';
COMMENT ON COLUMN "YY_YY"."YY_YY_STEP_CFB_HISTORY_BAK"."CSRQ" IS '患者出生日期';