客快物流大数据项目(七十九):Impala映射kudu表

举报
Lansonli 发表于 2022/12/19 16:19:35 2022/12/19
【摘要】 ​Impala映射kudu表一、​​​​​​​登录Hue页面1、选择Impala2、登录Hue页面二、选择Impala执行引擎1、选择Impala执行引擎2、进入编写执行sql语句窗口三、执行sql语句映射Kudu表若数据库已经存在,则使用级联的方式删除:DROP DATABASE logistics cascade;编写kudu与impala表的映射关系,Sql语句如下:CREATE DA...

Impala映射kudu表

一、​​​​​​​登录Hue页面

1、选择Impala

2、登录Hue页面

二、选择Impala执行引擎

1、选择Impala执行引擎

2、进入编写执行sql语句窗口

三、执行sql语句映射Kudu表

数据库已经存在,则使用级联的方式删除:

DROP DATABASE logistics cascade;


编写kudu与impala表的映射关系,Sql语句如下:

CREATE DATABASE IF NOT EXISTS logistics;

CREATE EXTERNAL TABLE logistics.tbl_warehouse_transport_tool_detail

 STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_warehouse_transport_tool_detail',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_dot_transport_tool_detail STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_dot_transport_tool_detail',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');
  
  
CREATE EXTERNAL TABLE logistics.tbl_express_bill_detail STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_express_bill_detail',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_waybill STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_waybill',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_collect_package STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_collect_package',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_store_grid STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_store_grid',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_pkg STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_pkg',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_out_warehouse_detail STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_out_warehouse_detail',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_goods_rack STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_goods_rack',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_warehouse_receipt_detail STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_warehouse_receipt_detail',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_fixed_area STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_fixed_area',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_department STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_department',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_express_bill STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_express_bill',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_delivery_record STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_delivery_record',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_waybill_detail STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_waybill_detail',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_warehouse_emp STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_warehouse_emp',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_emp_info_map STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_emp_info_map',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_service_evaluation STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_service_evaluation',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_dot_transport_tool STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_dot_transport_tool',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_postal_standard STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_postal_standard',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_emp STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_emp',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_push_warehouse_detail STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_push_warehouse_detail',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_customer STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_customer',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_warehouse_transport_tool STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_warehouse_transport_tool',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_deliver_region STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_deliver_region',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_waybill_state_record STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_waybill_state_record',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_company_dot_map STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_company_dot_map',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_areas STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_areas',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_company_warehouse_map STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_company_warehouse_map',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_warehouse_send_vehicle STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_warehouse_send_vehicle',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_warehouse_vehicle_map STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_warehouse_vehicle_map',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_customer_detail STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_customer_detail',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_company STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_company',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_courier STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_courier',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_vehicle_monitor STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_vehicle_monitor',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_deliver_package STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_deliver_package',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_charge_standard STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_charge_standard',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_warehouse_rack_map STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_warehouse_rack_map',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_codes STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_codes',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_warehouse STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_warehouse',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_job STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_job',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_waybill_line STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_waybill_line',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_work_time STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_work_time',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_consumer_sender_info STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_consumer_sender_info',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_driver STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_driver',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_consumer_address_map STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_consumer_address_map',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_warehouse_receipt STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_warehouse_receipt',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_dot STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_dot',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_transport_tool STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_transport_tool',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_out_warehouse STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_out_warehouse',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');


CREATE EXTERNAL TABLE logistics.tbl_address STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_address',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');  

CREATE EXTERNAL TABLE logistics.tbl_route STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_route',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_push_warehouse STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_push_warehouse',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_company_transport_route_ma STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_company_transport_route_ma',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE logistics.tbl_express_package STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_express_package',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');

CREATE EXTERNAL TABLE `tbl_warehouse_detail` STORED AS KUDU TBLPROPERTIES(
  'kudu.table_name' = 'tbl_warehouse_detail',
  'kudu.master_addresses' = 'node2.lanson.cn:7051');
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。