前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >客快物流大数据项目(七十九):Impala映射kudu表

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

原创
作者头像
Lansonli
发布2022-12-19 15:43:58
4670
发布2022-12-19 15:43:58
举报
文章被收录于专栏:Lansonli技术博客

Impala映射kudu表

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

1、选择Impala

2、登录Hue页面

二、选择Impala执行引擎

1、选择Impala执行引擎

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

三、执行sql语句映射Kudu表

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

代码语言:javascript
复制
DROP DATABASE logistics cascade;

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

代码语言:javascript
复制
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');

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • ​Impala映射kudu表
    • 一、​​​​​​​登录Hue页面
      • 1、选择Impala
      • 2、登录Hue页面
    • 二、选择Impala执行引擎
      • 1、选择Impala执行引擎
      • 2、进入编写执行sql语句窗口
    • 三、执行sql语句映射Kudu表
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档