当前位置:   article > 正文

hbase 映射hive表_hbase表映射hive表原理

hbase表映射hive表原理
CREATE EXTERNAL TABLE `core_business_preview.operation_enterprise_active_daily`(
 `action_date` string,
  `enterprise_id` string,
      `enterprise_account` string,
      `industry` string,
      `appstarttime` string,
      `enterprisetype` string,
      `source` string,
      `sales_name` string,
      `csm_name` string,
      `agentName` string,
      `province` string,
      `isStandard` string,
      `enterpriseaccountnumber` string,
      `online_user_num` string,
      `enterprise_dept` string,
      `enterprise_key_contact_name` string,
      `enterprise_key_contact_phone` string,
      `enterprise_key_contact_email` string,
      `enterprise_contact_name` string,
      `enterprise_contact_phone` string,
      `enterprise_contact_email` string,
      `feed_message_total` string,
      `feed_share` string,
      `feed_log` string,
      `feed_println` string,
      `feed_discuss` string,
      `feed_reward` string,
      `feed_remind` string,
      `feed_crm_server` string,
      `feed_crm_sale` string,
      `feed_order` string,
      `feed_customer` string,
      `feed_linkman` string,
      `feed_location` string,
      `feed_waiqin` string,
      `feed_follow` string,
      `feed_approve` string,
      `feed_at` string,
      `feed_text` string,
      `feed_table` string,
      `feed_image` string,
      `feed_file` string,
      `feed_audio` string,
      `feed_reply` string,
      `feed_favorite` string,
      `feed_topic` string,
      `feed_schedule` string,
      `feed_notice` string,
      `feed_task` string,
      `feed_set_task` string,
      `feed_send_vote` string,
      `feed_join_vote` string,
      `feed_like` string,
      `feed_send_receipt` string,
      `feed_click_receipt` string,
      `crm_new_customer` string,
      `crm_update_customer` string,
      `crm_total_custormer` string,
      `crm_new_contacts` string,
      `crm_total_contacts` string,
      `crm_total_business` string,
      `crm_update_business` string,
      `crm_new_business` string,
      `crm_total_sale_order` string,
      `crm_update_sale_order` string,
      `crm_new_sale_order` string,
      `crm_total_payment` string,
      `crm_new_payment` string,
      `crm_total_refund` string,
      `crm_new_refund` string,
      `crm_total_return_order` string,
      `crm_new_return_order` string,
      `crm_total_clue` string,
      `crm_new_clue` string,
      `crm_total_clue_pool` string,
      `crm_new_clue_pool` string,
      `crm_total_high_seas` string,
      `crm_new_high_seas` string,
      `crm_total_visit` string,
      `crm_new_visit` string,
      `crm_total_check` string,
      `crm_new_check` string,
      `crm_total_role` string,
      `crm_new_role` string,
      `crm_total_form` string,
      `crm_new_form` string,
      `crm_total_contract` string,
      `crm_new_contract` string,
      `crm_total_market_activitie` string,
      `crm_new_market_activitie` string,
      `crm_new_competitor` string,
      `crm_update_competitor` string,
      `crm_new_product` string,
      `crm_total_product` string,
      `crm_update_product` string,
      `crm_total_sales_process` string,
      `crm_update_sales_process` string,
      `server_new_server_num` string,
      `assistant_kaoqin` string,
      `assistant_kaoqin_success` string,
      `assistant_new_project` string,
      `assistant_total_project` string,
      `assistant_new_battlefield` string,
      `assistant_total_battlefield` string,
      `assistant_reward` string,
      `assistant_new_meetting` string,
      `assistant_begin_meetting` string,
      `assistant_attent_meetting` string,
      `assistant_conference_turn_task` string,
      `assistant_total_attendance` string,
      `assistant_questions` string,
      `assistant_meeting_minutes` string,
      `assistant_new_pk` string,
      `assistant_total_pk` string,
      `assistant_seed_person` string,
      `assistant_look_person` string,
      `assistant_total_payroll` string,
      `assistant_Import_success_times` string,
      `assistant_course_number` string,
      `assistant_total_study_person` string,
      `assistant_replay_message` string
 ) 
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
WITH SERDEPROPERTIES (
'hbase.columns.mapping'="
     data_family:action_date,
  data_family:enterprise_id,
      data_family:enterprise_account,
      data_family:industry,
      data_family:appstarttime,
      data_family:enterprisetype,
      data_family:source,
      data_family:sales_name,
      data_family:csm_name,
      data_family:agentName,
      data_family:province,
      data_family:isStandard,
      data_family:enterpriseaccountnumber,
      data_family:online_user_num,
      data_family:enterprise_dept,
      data_family:enterprise_key_contact_name,
      data_family:enterprise_key_contact_phone,
      data_family:enterprise_key_contact_email,
      data_family:enterprise_contact_name,
      data_family:enterprise_contact_phone,
      data_family:enterprise_contact_email,
      data_family:feed_message_total,
      data_family:feed_share,
      data_family:feed_log,
      data_family:feed_println,
      data_family:feed_discuss,
      data_family:feed_reward,
      data_family:feed_remind,
      data_family:feed_crm_server,
      data_family:feed_crm_sale,
      data_family:feed_order,
      data_family:feed_customer,
      data_family:feed_linkman,
      data_family:feed_location,
      data_family:feed_waiqin,
      data_family:feed_follow,
      data_family:feed_approve,
      data_family:feed_at,
      data_family:feed_text,
      data_family:feed_table,
      data_family:feed_image,
      data_family:feed_file,
      data_family:feed_audio,
      data_family:feed_reply,
      data_family:feed_favorite,
      data_family:feed_topic,
      data_family:feed_schedule,
      data_family:feed_notice,
      data_family:feed_task,
      data_family:feed_set_task,
      data_family:feed_send_vote,
      data_family:feed_join_vote,
      data_family:feed_like,
      data_family:feed_send_receipt,
      data_family:feed_click_receipt,
      data_family:crm_new_customer,
      data_family:crm_update_customer,
      data_family:crm_total_custormer,
      data_family:crm_new_contacts,
      data_family:crm_total_contacts,
      data_family:crm_total_business,
      data_family:crm_update_business,
      data_family:crm_new_business,
      data_family:crm_total_sale_order,
      data_family:crm_update_sale_order,
      data_family:crm_new_sale_order,
      data_family:crm_total_payment,
      data_family:crm_new_payment,
      data_family:crm_total_refund,
      data_family:crm_new_refund,
      data_family:crm_total_return_order,
      data_family:crm_new_return_order,
      data_family:crm_total_clue,
      data_family:crm_new_clue,
      data_family:crm_total_clue_pool,
      data_family:crm_new_clue_pool,
      data_family:crm_total_high_seas,
      data_family:crm_new_high_seas,
      data_family:crm_total_visit,
      data_family:crm_new_visit,
      data_family:crm_total_check,
      data_family:crm_new_check,
      data_family:crm_total_role,
      data_family:crm_new_role,
      data_family:crm_total_form,
      data_family:crm_new_form,
      data_family:crm_total_contract,
      data_family:crm_new_contract,
      data_family:crm_total_market_activitie,
      data_family:crm_new_market_activitie,
      data_family:crm_new_competitor,
      data_family:crm_update_competitor,
      data_family:crm_new_product,
      data_family:crm_total_product,
      data_family:crm_update_product,
      data_family:crm_total_sales_process,
      data_family:crm_update_sales_process,
      data_family:server_new_server_num,
      data_family:assistant_kaoqin,
      data_family:assistant_kaoqin_success,
      data_family:assistant_new_project,
      data_family:assistant_total_project,
      data_family:assistant_new_battlefield,
      data_family:assistant_total_battlefield,
      data_family:assistant_reward,
      data_family:assistant_new_meetting,
      data_family:assistant_begin_meetting,
      data_family:assistant_attent_meetting,
      data_family:assistant_conference_turn_task,
      data_family:assistant_total_attendance,
      data_family:assistant_questions,
      data_family:assistant_meeting_minutes,
      data_family:assistant_new_pk,
      data_family:assistant_total_pk,
      data_family:assistant_seed_person,
      data_family:assistant_look_person,
      data_family:assistant_total_payroll,
      data_family:assistant_Import_success_times,
      data_family:assistant_course_number,
      data_family:assistant_total_study_person,
      data_family:assistant_replay_message "
  ) 
TBLPROPERTIES("hbase.table.name" = "FHC_BIG_ACTIVE_DAILY");
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号