You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/01/12 11:56:53 UTC

[GitHub] [incubator-doris] Dam1029 commented on issue #5224: StringType can not transform to DateType when read hive table to doris

Dam1029 commented on issue #5224:
URL: https://github.com/apache/incubator-doris/issues/5224#issuecomment-758608723


   > Please add hive's table schema and doris's table schema.
   > And the what's the screenshots's content, my chrome can't load the image even using cellphone with 4G
   
   ```
   CREATE EXTERNAL TABLE `hive_h5_event_info`(
     `logdate` varchar(100) NULL COMMENT "时间",
     `region` varchar(100) NULL COMMENT "地域",
     `app_id` int(11) NOT NULL COMMENT "活动id",
     `user` varchar(25) NOT NULL COMMENT "",
     `event_action` varchar(255) NULL DEFAULT "" COMMENT "",
     `event_category` varchar(255) NULL DEFAULT "" COMMENT "",
     `event_label` varchar(255) NULL DEFAULT "" COMMENT "",
     `event_value` varchar(255) NULL DEFAULT "" COMMENT "",
     `user_level` int(11) NULL DEFAULT "0" COMMENT "",
     `user_vip_level` int(11) NULL DEFAULT "0" COMMENT "",
     `user_tag` int(11) NULL DEFAULT "0" COMMENT "",
     `event_ts` bigint(20) NULL DEFAULT "0" COMMENT "",
     `uuid` varchar(50) NOT NULL COMMENT ""
   )
   ENGINE=hive
   PROPERTIES
   (
      "database" = "xxx",
      "table" = "xxx",
      "hive.metastore.uris" = "xxx"
   );
   ```
   
   ```
   CREATE TABLE `global_dict_h5_event_info` (
     `logdate` date NOT NULL COMMENT "分区日期",
     `app_id` int(11) NOT NULL COMMENT "活动id",
     `user` varchar(25) NOT NULL COMMENT "",
     `event_action` varchar(255) NULL DEFAULT "" COMMENT "",
     `event_category` varchar(255) NULL DEFAULT "" COMMENT "",
     `event_label` varchar(255) NULL DEFAULT "" COMMENT "",
     `event_value` varchar(255) NULL DEFAULT "" COMMENT "",
     `user_level` int(11) NULL DEFAULT "0" COMMENT "",
     `user_vip_level` int(11) NULL DEFAULT "0" COMMENT "",
     `user_tag` int(11) NULL DEFAULT "0" COMMENT "",
     `event_ts` bigint(20) NULL DEFAULT "0" COMMENT "",
     `uuid` bitmap BITMAP_UNION NOT NULL COMMENT ""
   ) ENGINE=OLAP
   AGGREGATE KEY(`logdate`, `app_id`, `user`, `event_action`, `event_category`, `event_label`, `event_value`, `user_level`, `user_vip_level`, `user_tag`, `event_ts`)
   COMMENT "OLAP"
   PARTITION BY RANGE(`logdate`)
   ()
   DISTRIBUTED BY HASH(`logdate`) BUCKETS 10
   PROPERTIES (
   "replication_num" = "3",
   "dynamic_partition.enable" = "true",
   "dynamic_partition.time_unit" = "DAY",
   "dynamic_partition.start" = "-2147483648",
   "dynamic_partition.end" = "2",
   "dynamic_partition.prefix" = "p",
   "dynamic_partition.replication_num" = "3",
   "dynamic_partition.buckets" = "12",
   "in_memory" = "false",
   "storage_format" = "V2"
   );
   ```
   
   
   ```
   LOAD LABEL test.global_dict_h5_event_info
   (   DATA FROM TABLE hive_h5_event_info
       INTO TABLE global_dict_h5_event_info
       SET(logdate=logdate,game=game,event_action=event_action,event_category=event_category,event_label=event_label,
       event_value=event_value,game_level=game_level,game_vip_level=game_vip_level,game_tag=game_tag,event_ts=event_ts,uuid=bitmap_dict(uuid)))
   WITH RESOURCE 'spark'
   (
       "spark.executor.memory" = "10g",
       "spark.executor.instances" = "30",
       "spark.shuffle.compress" = "true"
   )
   PROPERTIES
   ("timeout" = "3600");
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org