-- 表名 user_whole
DROP TABLE IF EXISTS gghb.oss_table_origin_user_whole;
CREATE TABLE IF NOT EXISTS gghb.oss_table_origin_user_whole (
  user_id VARCHAR(32),
  create_time VARCHAR(32),
  sex VARCHAR(32),
  date_of_birth VARCHAR(32),
  country VARCHAR(32),
  device VARCHAR(32)
)
ENGINE = 'OSS'
TABLE_PROPERTIES = '{
  "endpoint":"oss-cn-beijing-internal.aliyuncs.com",
  "url":"oss://project-tdd/tdd-gghb/user_whole.csv",
  "accessid":"LTAI4FwyYCrpLESasUbwDrkm",
  "accesskey":"4mgL7PO1tcSer21GnrKfC15UBktheb",
  "delimiter":",",
  "skip_header_line_count":0
}';

-- 表名 account_flow_record
DROP TABLE IF EXISTS gghb.oss_table_origin_account_flow_record;
CREATE TABLE IF NOT EXISTS gghb.oss_table_origin_account_flow_record (
  user_id VARCHAR(32),
  diamonds INT,
  create_time datetime
)
ENGINE = 'OSS'
TABLE_PROPERTIES = '{
  "endpoint":"oss-cn-beijing-internal.aliyuncs.com",
  "url":"oss://project-tdd/tdd-gghb/account_flow_record.csv",
  "accessid":"LTAI4FwyYCrpLESasUbwDrkm",
  "accesskey":"4mgL7PO1tcSer21GnrKfC15UBktheb",
  "delimiter":",",
  "skip_header_line_count":0
}';

-- 表名 chat
DROP TABLE IF EXISTS gghb.oss_table_origin_chat;
CREATE TABLE IF NOT EXISTS gghb.oss_table_origin_chat (
  user_a_id VARCHAR(32),
  user_b_id VARCHAR(32),
  chat_count INT,
  create_time VARCHAR(32)
)
ENGINE = 'OSS'
TABLE_PROPERTIES = '{
  "endpoint":"oss-cn-beijing-internal.aliyuncs.com",
  "url":"oss://project-tdd/tdd-gghb/chat.csv",
  "accessid":"LTAI4FwyYCrpLESasUbwDrkm",
  "accesskey":"4mgL7PO1tcSer21GnrKfC15UBktheb",
  "delimiter":",",
  "skip_header_line_count":0
}';

-- 表名 consume_diamonds
DROP TABLE IF EXISTS gghb.oss_table_origin_consume_diamonds;
CREATE TABLE IF NOT EXISTS gghb.oss_table_origin_consume_diamonds (
  user_id VARCHAR(32),
  action VARCHAR(32),
  amount INT,
  create_time datetime
)
ENGINE = 'OSS'
TABLE_PROPERTIES = '{
  "endpoint":"oss-cn-beijing-internal.aliyuncs.com",
  "url":"oss://project-tdd/tdd-gghb/consume_diamonds.csv",
  "accessid":"LTAI4FwyYCrpLESasUbwDrkm",
  "accesskey":"4mgL7PO1tcSer21GnrKfC15UBktheb",
  "delimiter":",",
  "skip_header_line_count":0
}';

-- 表名 feed
DROP TABLE IF EXISTS gghb.oss_table_origin_feed;
CREATE TABLE IF NOT EXISTS gghb.oss_table_origin_feed (
  user_id VARCHAR(32),
  create_time VARCHAR(32),
  feed_id VARCHAR(32)
)
ENGINE = 'OSS'
TABLE_PROPERTIES = '{
  "endpoint":"oss-cn-beijing-internal.aliyuncs.com",
  "url":"oss://project-tdd/tdd-gghb/feed.csv",
  "accessid":"LTAI4FwyYCrpLESasUbwDrkm",
  "accesskey":"4mgL7PO1tcSer21GnrKfC15UBktheb",
  "delimiter":",",
  "skip_header_line_count":0
}';

-- 表名 follow
DROP TABLE IF EXISTS gghb.oss_table_origin_follow;
CREATE TABLE IF NOT EXISTS gghb.oss_table_origin_follow (
  user_a_id VARCHAR(32),
  user_b_id VARCHAR(32),
  create_time VARCHAR(32)
)
ENGINE = 'OSS'
TABLE_PROPERTIES = '{
  "endpoint":"oss-cn-beijing-internal.aliyuncs.com",
  "url":"oss://project-tdd/tdd-gghb/follow.csv",
  "accessid":"LTAI4FwyYCrpLESasUbwDrkm",
  "accesskey":"4mgL7PO1tcSer21GnrKfC15UBktheb",
  "delimiter":",",
  "skip_header_line_count":0
}';

-- 表名 match
DROP TABLE IF EXISTS gghb.oss_table_origin_match;
CREATE TABLE IF NOT EXISTS gghb.oss_table_origin_match (
  user_a_id VARCHAR(32),
  user_b_id VARCHAR(32),
  type VARCHAR(32),
  create_time VARCHAR(32),
  like_other VARCHAR(32),
  other_like VARCHAR(32),
  chat_count INT
)
ENGINE = 'OSS'
TABLE_PROPERTIES = '{
  "endpoint":"oss-cn-beijing-internal.aliyuncs.com",
  "url":"oss://project-tdd/tdd-gghb/match.csv",
  "accessid":"LTAI4FwyYCrpLESasUbwDrkm",
  "accesskey":"4mgL7PO1tcSer21GnrKfC15UBktheb",
  "delimiter":",",
  "skip_header_line_count":0
}';

-- 表名 user_action
DROP TABLE IF EXISTS gghb.oss_table_origin_user_action;
CREATE TABLE IF NOT EXISTS gghb.oss_table_origin_user_action (
  user_id VARCHAR(32),
  create_time VARCHAR(32)
)
ENGINE = 'OSS'
TABLE_PROPERTIES = '{
  "endpoint":"oss-cn-beijing-internal.aliyuncs.com",
  "url":"oss://project-tdd/tdd-gghb/user_action.csv",
  "accessid":"LTAI4FwyYCrpLESasUbwDrkm",
  "accesskey":"4mgL7PO1tcSer21GnrKfC15UBktheb",
  "delimiter":",",
  "skip_header_line_count":0
}';
