Doris版本:2.1.6
Hive查询SQL:
select * from dmk_pp_module.module_jh_indicator
where value1_desc = 'deliver_plan';
Doris查询SQL:
select * from hive.dmk_pp_module.module_jh_indicator
where value1_desc = 'deliver_plan';
查询结果:
Hive查询有数据,Doris查询无数据无报错。
Catalog创建语句:
CREATE CATALOG hive comment 'hive_catalog'
PROPERTIES(
'type'='hms',
'hive.metastore.uris' = 'thrift://*.*.*:*,thrift://*.*.*:*',
'dfs.nameservices'='*',
'hadoop.username' = 'hive',
'dfs.ha.namenodes.longins'='namenode182,namenode249',
'dfs.namenode.rpc-address.longins.namenode182'='*.*.*:*',
'dfs.namenode.rpc-address.longins.namenode249'='*.*.*:*',
'dfs.client.failover.proxy.provider.longins'='org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider',
'hadoop.security.authentication' = 'kerberos',
'hadoop.kerberos.keytab' = '/data/doris/soft/apache-doris-2.0.2-bin-x64/jdbc_drivers/***.keytab',
'hadoop.kerberos.principal' = '***@*.*',
'yarn.resourcemanager.principal' = 'yarn/_HOST@*.*'
);
hive建表语句:
CREATE EXTERNAL TABLE `dmk_pp_module`.`module_jh_indicator`(
`index_name` string COMMENT '指标名称',
`base_area` string COMMENT '基地',
`base_area_name` string COMMENT '基地名称',
`workshop_code` string COMMENT '车间',
`workshop_desc` string COMMENT '车间名称',
`production_line_no` string COMMENT '产线',
`production_line` string COMMENT '产线名称',
`shift_no` string COMMENT '班次',
`dim1` string COMMENT '维度1',
`dim1_desc` string COMMENT '维度1说明',
`dim2` string COMMENT '维度2',
`dim2_desc` string COMMENT '维度2说明',
`dim3` string COMMENT '维度3',
`dim3_desc` string COMMENT '维度3说明',
`dim4` string COMMENT '维度4',
`dim4_desc` string COMMENT '维度4说明',
`value1` double COMMENT '因子1',
`value1_desc` string COMMENT '因子1说明',
`value2` double COMMENT '因子2',
`value2_desc` string COMMENT '因子2说明',
`value3` double COMMENT '因子3',
`value3_desc` string COMMENT '因子3说明',
`value4` double COMMENT '因子4',
`value4_desc` string COMMENT '因子4说明',
`value5` double COMMENT '因子5',
`value5_desc` string COMMENT '因子5说明',
`creation_time` string COMMENT '数据生成时间',
`stat_date` string COMMENT '统计时间',
`month_id` string COMMENT '月',
`business_code` string COMMENT '业务域分区')
COMMENT '组件指标结果表'
PARTITIONED BY (
`index_code` string COMMENT '指标编码',
`date_type` string COMMENT '统计时间',
`day_id` string COMMENT '日分区')
ROW FORMAT SERDE
'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
'hdfs://*/*/*/*/*/module_jh_indicator';