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

Posted Lansonli

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了客快物流大数据项目(七十九):Impala映射kudu表相关的知识,希望对你有一定的参考价值。

文章目录

Impala映射kudu表

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

1、选择Impala

2、登录Hue页面

二、选择Impala执行引擎

1、选择Impala执行引擎

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

三、执行sql语句映射Kudu表


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');

  • 📢博客主页:https://lansonli.blog.csdn.net
  • 📢欢迎点赞 👍 收藏 ⭐留言 📝 如有错误敬请指正!
  • 📢本文由 Lansonli 原创,首发于 CSDN博客🙉
  • 📢停下休息的时候不要忘了别人还在奔跑,希望大家抓紧时间学习,全力奔赴更美好的生活✨

以上是关于客快物流大数据项目(七十九):Impala映射kudu表的主要内容,如果未能解决你的问题,请参考以下文章

客快物流大数据项目(七十):Impala入门介绍

客快物流大数据项目(七十三):Impala数据导入方式

客快物流大数据项目(七十四):Impala的java开发

客快物流大数据项目(七十六):使用Impala对kudu进行DML操作

客快物流大数据项目(七十五):使用impala创建kudu表

客快物流大数据项目(七十一):impala-shell命令参数