若数据库已经存在,则使用级联的方式删除:
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');
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。