1. CREATE TABLE `dim_nat_code`(
    2. `nat_id` string COMMENT '编码',
    3. `nat_name` string COMMENT '国家或地区')
    4. COMMENT '国家或地区码表'
    5. ROW FORMAT SERDE
    6. 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
    7. WITH SERDEPROPERTIES (
    8. 'field.delim'='\t',
    9. 'serialization.format'='\t')
    10. STORED AS INPUTFORMAT
    11. 'org.apache.hadoop.mapred.TextInputFormat'
    12. OUTPUTFORMAT
    13. 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
    14. LOCATION
    15. 'hdfs://mycluster/warehouse/travel/ods/ODS_NAT_CODE'
    16. TBLPROPERTIES (
    17. 'bucketing_version'='2',
    18. 'transient_lastDdlTime'='1630152666')
    19. ;
    20. insert into dim_native_code (nat_id,nat_name) values (852, '中国香港')
    21. ;insert into dim_native_code (nat_id,nat_name) values (853, '中国澳门')
    22. ;insert into dim_native_code (nat_id,nat_name) values (886, '中国台湾')
    23. ;insert into dim_native_code (nat_id,nat_name) values (100, '美国')
    24. ;insert into dim_native_code (nat_id,nat_name) values (100, '加拿大')
    25. ;insert into dim_native_code (nat_id,nat_name) values (100, '圣基茨和尼维斯')
    26. ;insert into dim_native_code (nat_id,nat_name) values (100, '圣文森特')
    27. ;insert into dim_native_code (nat_id,nat_name) values (100, '特克斯和凯特斯群岛')
    28. ;insert into dim_native_code (nat_id,nat_name) values (100, '英属维尔京群岛')
    29. ;insert into dim_native_code (nat_id,nat_name) values (124, '巴巴多斯岛')
    30. ;insert into dim_native_code (nat_id,nat_name) values (126, '安圭拉岛')
    31. ;insert into dim_native_code (nat_id,nat_name) values (126, '安提瓜岛巴布达岛')
    32. ;insert into dim_native_code (nat_id,nat_name) values (134, '开曼群岛')
    33. ;insert into dim_native_code (nat_id,nat_name) values (147, '格林纳达')
    34. ;insert into dim_native_code (nat_id,nat_name) values (166, '蒙特塞拉特岛')
    35. ;insert into dim_native_code (nat_id,nat_name) values (167, '关岛')
    36. ;insert into dim_native_code (nat_id,nat_name) values (175, '圣卢西亚')
    37. ;insert into dim_native_code (nat_id,nat_name) values (180, '多米尼加共和国')
    38. ;insert into dim_native_code (nat_id,nat_name) values (186, '特立尼达和多巴哥'
    39. ;insert into dim_native_code (nat_id,nat_name) values (187, '牙买加')
    40. ;insert into dim_native_code (nat_id,nat_name) values (193, '波多黎各')
    41. ;insert into dim_native_code (nat_id,nat_name) values (20 , '埃及')
    42. ;insert into dim_native_code (nat_id,nat_name) values (212, '摩洛哥')
    43. ;insert into dim_native_code (nat_id,nat_name) values (213, '阿尔及利亚')
    44. ;insert into dim_native_code (nat_id,nat_name) values (216, '突尼斯')
    45. ;insert into dim_native_code (nat_id,nat_name) values (218, '利比亚')
    46. ;insert into dim_native_code (nat_id,nat_name) values (220, '冈比亚')
    47. ;insert into dim_native_code (nat_id,nat_name) values (221, '塞内加尔')
    48. ;insert into dim_native_code (nat_id,nat_name) values (222, '毛里塔尼亚')
    49. ;insert into dim_native_code (nat_id,nat_name) values (223, '马里')
    50. ;insert into dim_native_code (nat_id,nat_name) values (224, '几内亚')
    51. ;insert into dim_native_code (nat_id,nat_name) values (225, '科特迪瓦')
    52. ;insert into dim_native_code (nat_id,nat_name) values (226, '布基纳法索')
    53. ;insert into dim_native_code (nat_id,nat_name) values (227, '尼日尔')
    54. ;insert into dim_native_code (nat_id,nat_name) values (228, '多哥')
    55. ;insert into dim_native_code (nat_id,nat_name) values (229, '贝宁')
    56. ;insert into dim_native_code (nat_id,nat_name) values (230, '毛里求斯')
    57. ;insert into dim_native_code (nat_id,nat_name) values (231, '利比里亚')
    58. ;insert into dim_native_code (nat_id,nat_name) values (232, '塞拉利昂')
    59. ;insert into dim_native_code (nat_id,nat_name) values (233, '加纳')
    60. ;insert into dim_native_code (nat_id,nat_name) values (234, '尼日利亚')
    61. ;insert into dim_native_code (nat_id,nat_name) values (235, '乍得')
    62. ;insert into dim_native_code (nat_id,nat_name) values (236, '中非')
    63. ;insert into dim_native_code (nat_id,nat_name) values (237, '喀麦隆')
    64. ;insert into dim_native_code (nat_id,nat_name) values (238, '佛得角')
    65. ;insert into dim_native_code (nat_id,nat_name) values (242, '刚果')
    66. ;insert into dim_native_code (nat_id,nat_name) values (244, '安哥拉')
    67. ;insert into dim_native_code (nat_id,nat_name) values (245, '几内亚比绍')
    68. ;insert into dim_native_code (nat_id,nat_name) values (248, '塞舌尔')
    69. ;insert into dim_native_code (nat_id,nat_name) values (249, '苏丹')
    70. ;insert into dim_native_code (nat_id,nat_name) values (250, '卢旺达')
    71. ;insert into dim_native_code (nat_id,nat_name) values (251, '埃塞俄比亚')
    72. ;insert into dim_native_code (nat_id,nat_name) values (253, '吉布提')
    73. ;insert into dim_native_code (nat_id,nat_name) values (254, '肯尼亚')
    74. ;insert into dim_native_code (nat_id,nat_name) values (255, '坦桑尼亚')
    75. ;insert into dim_native_code (nat_id,nat_name) values (256, '乌干达')
    76. ;insert into dim_native_code (nat_id,nat_name) values (257, '布隆迪')
    77. ;insert into dim_native_code (nat_id,nat_name) values (258, '莫桑比克')
    78. ;insert into dim_native_code (nat_id,nat_name) values (260, '赞比亚')
    79. ;insert into dim_native_code (nat_id,nat_name) values (261, '马达加斯加')
    80. ;insert into dim_native_code (nat_id,nat_name) values (262, '留尼旺岛')
    81. ;insert into dim_native_code (nat_id,nat_name) values (263, '津巴布韦')
    82. ;insert into dim_native_code (nat_id,nat_name) values (265, '马拉维')
    83. ;insert into dim_native_code (nat_id,nat_name) values (266, '莱索托')
    84. ;insert into dim_native_code (nat_id,nat_name) values (267, '博茨瓦纳')
    85. ;insert into dim_native_code (nat_id,nat_name) values (269, '科摩罗')
    86. ;insert into dim_native_code (nat_id,nat_name) values (27 , '南非')
    87. ;insert into dim_native_code (nat_id,nat_name) values (298, '法罗群岛')
    88. ;insert into dim_native_code (nat_id,nat_name) values (299, '格陵兰岛')
    89. ;insert into dim_native_code (nat_id,nat_name) values (30 , '希腊')
    90. ;insert into dim_native_code (nat_id,nat_name) values (31 , '荷兰')
    91. ;insert into dim_native_code (nat_id,nat_name) values (32 , '比利时')
    92. ;insert into dim_native_code (nat_id,nat_name) values (33 , '法属安的列斯群岛')
    93. ;insert into dim_native_code (nat_id,nat_name) values (34 , '西班牙')
    94. ;insert into dim_native_code (nat_id,nat_name) values (350, '直布罗陀')
    95. ;insert into dim_native_code (nat_id,nat_name) values (351, '葡萄牙')
    96. ;insert into dim_native_code (nat_id,nat_name) values (352, '卢森堡')
    97. ;insert into dim_native_code (nat_id,nat_name) values (353, '爱尔兰')
    98. ;insert into dim_native_code (nat_id,nat_name) values (354, '冰岛')
    99. ;insert into dim_native_code (nat_id,nat_name) values (355, '阿尔巴尼亚')
    100. ;insert into dim_native_code (nat_id,nat_name) values (356, '马耳他')
    101. ;insert into dim_native_code (nat_id,nat_name) values (357, '塞浦路斯')
    102. ;insert into dim_native_code (nat_id,nat_name) values (358, '芬兰')
    103. ;insert into dim_native_code (nat_id,nat_name) values (359, '保加利亚')
    104. ;insert into dim_native_code (nat_id,nat_name) values (36 , '匈牙利')
    105. ;insert into dim_native_code (nat_id,nat_name) values (370, '立陶宛')
    106. ;insert into dim_native_code (nat_id,nat_name) values (371, '拉脱维亚')
    107. ;insert into dim_native_code (nat_id,nat_name) values (372, '爱沙尼亚')
    108. ;insert into dim_native_code (nat_id,nat_name) values (373, '摩尔多瓦')
    109. ;insert into dim_native_code (nat_id,nat_name) values (374, '亚美尼亚')
    110. ;insert into dim_native_code (nat_id,nat_name) values (375, '白俄罗斯')
    111. ;insert into dim_native_code (nat_id,nat_name) values (376, '安道尔')
    112. ;insert into dim_native_code (nat_id,nat_name) values (377, '摩纳哥')
    113. ;insert into dim_native_code (nat_id,nat_name) values (378, '圣马力诺')
    114. ;insert into dim_native_code (nat_id,nat_name) values (387, '波斯尼亚和黑塞哥维那')
    115. ;insert into dim_native_code (nat_id,nat_name) values (389, '马其顿')
    116. ;insert into dim_native_code (nat_id,nat_name) values (39 , '意大利')
    117. ;insert into dim_native_code (nat_id,nat_name) values (40 , '罗马尼亚')
    118. ;insert into dim_native_code (nat_id,nat_name) values (41 , '瑞士')
    119. ;insert into dim_native_code (nat_id,nat_name) values (420, '捷克')
    120. ;insert into dim_native_code (nat_id,nat_name) values (421, '斯洛伐克')
    121. ;insert into dim_native_code (nat_id,nat_name) values (423, '列支敦士登')
    122. ;insert into dim_native_code (nat_id,nat_name) values (43 , '奥地利')
    123. ;insert into dim_native_code (nat_id,nat_name) values (44 , '英国')
    124. ;insert into dim_native_code (nat_id,nat_name) values (45 , '丹麦')
    125. ;insert into dim_native_code (nat_id,nat_name) values (46 , '瑞典')
    126. ;insert into dim_native_code (nat_id,nat_name) values (47 , '挪威')
    127. ;insert into dim_native_code (nat_id,nat_name) values (48 , '波兰')
    128. ;insert into dim_native_code (nat_id,nat_name) values (49 , '德国')
    129. ;insert into dim_native_code (nat_id,nat_name) values (501, '伯利兹')
    130. ;insert into dim_native_code (nat_id,nat_name) values (502, '危地马拉')
    131. ;insert into dim_native_code (nat_id,nat_name) values (503, '萨尔瓦多')
    132. ;insert into dim_native_code (nat_id,nat_name) values (504, '洪都拉斯')
    133. ;insert into dim_native_code (nat_id,nat_name) values (505, '尼加拉瓜')
    134. ;insert into dim_native_code (nat_id,nat_name) values (506, '哥斯达黎加')
    135. ;insert into dim_native_code (nat_id,nat_name) values (507, '巴拿马')
    136. ;insert into dim_native_code (nat_id,nat_name) values (51 , '秘鲁')
    137. ;insert into dim_native_code (nat_id,nat_name) values (52 , '墨西哥')
    138. ;insert into dim_native_code (nat_id,nat_name) values (53 , '古巴')
    139. ;insert into dim_native_code (nat_id,nat_name) values (54 , '阿根廷')
    140. ;insert into dim_native_code (nat_id,nat_name) values (55 , '巴西')
    141. ;insert into dim_native_code (nat_id,nat_name) values (56 , '智利')
    142. ;insert into dim_native_code (nat_id,nat_name) values (57 , '哥伦比亚')
    143. ;insert into dim_native_code (nat_id,nat_name) values (58 , '委内瑞拉')
    144. ;insert into dim_native_code (nat_id,nat_name) values (591, '玻利维亚')
    145. ;insert into dim_native_code (nat_id,nat_name) values (592, '圭亚那')
    146. ;insert into dim_native_code (nat_id,nat_name) values (593, '厄瓜多尔')
    147. ;insert into dim_native_code (nat_id,nat_name) values (595, '巴拉圭')
    148. ;insert into dim_native_code (nat_id,nat_name) values (596, '马提尼克(法)')
    149. ;insert into dim_native_code (nat_id,nat_name) values (597, '苏里南')
    150. ;insert into dim_native_code (nat_id,nat_name) values (598, '乌拉圭')
    151. ;insert into dim_native_code (nat_id,nat_name) values (599, '荷属安的列斯群岛')
    152. ;insert into dim_native_code (nat_id,nat_name) values (60 , '马来西亚')
    153. ;insert into dim_native_code (nat_id,nat_name) values (61 , '澳大利亚')
    154. ;insert into dim_native_code (nat_id,nat_name) values (62 , '印度尼西亚')
    155. ;insert into dim_native_code (nat_id,nat_name) values (63 , '菲律宾')
    156. ;insert into dim_native_code (nat_id,nat_name) values (64 , '新西兰')
    157. ;insert into dim_native_code (nat_id,nat_name) values (65 , '新加坡')
    158. ;insert into dim_native_code (nat_id,nat_name) values (66 , '泰国')
    159. ;insert into dim_native_code (nat_id,nat_name) values (673, '文莱')
    160. ;insert into dim_native_code (nat_id,nat_name) values (675, '巴布亚新几内亚')
    161. ;insert into dim_native_code (nat_id,nat_name) values (676, '汤加')
    162. ;insert into dim_native_code (nat_id,nat_name) values (679, '斐济')
    163. ;insert into dim_native_code (nat_id,nat_name) values (680, '帕劳')
    164. ;insert into dim_native_code (nat_id,nat_name) values (687, '新喀里多尼亚')
    165. ;insert into dim_native_code (nat_id,nat_name) values (689, '法属波利尼西亚')
    166. ;insert into dim_native_code (nat_id,nat_name) values (7 , '俄罗斯')
    167. ;insert into dim_native_code (nat_id,nat_name) values (81 , '日本')
    168. ;insert into dim_native_code (nat_id,nat_name) values (82 , '韩国')
    169. ;insert into dim_native_code (nat_id,nat_name) values (84 , '越南')
    170. ;insert into dim_native_code (nat_id,nat_name) values (855, '柬埔寨')
    171. ;insert into dim_native_code (nat_id,nat_name) values (856, '老挝')
    172. ;insert into dim_native_code (nat_id,nat_name) values (880, '孟加拉国')
    173. ;insert into dim_native_code (nat_id,nat_name) values (90 , '土耳其')
    174. ;insert into dim_native_code (nat_id,nat_name) values (91 , '印度')
    175. ;insert into dim_native_code (nat_id,nat_name) values (92 , '巴基斯坦')
    176. ;insert into dim_native_code (nat_id,nat_name) values (93 , '阿富汗')
    177. ;insert into dim_native_code (nat_id,nat_name) values (94 , '斯里兰卡')
    178. ;insert into dim_native_code (nat_id,nat_name) values (95 , '缅甸')
    179. ;insert into dim_native_code (nat_id,nat_name) values (960, '马尔代夫')
    180. ;insert into dim_native_code (nat_id,nat_name) values (961, '黎巴嫩')
    181. ;insert into dim_native_code (nat_id,nat_name) values (962, '约旦')
    182. ;insert into dim_native_code (nat_id,nat_name) values (963, '叙利亚')
    183. ;insert into dim_native_code (nat_id,nat_name) values (964, '伊拉克')
    184. ;insert into dim_native_code (nat_id,nat_name) values (965, '科威特')
    185. ;insert into dim_native_code (nat_id,nat_name) values (966, '沙特阿拉伯')
    186. ;insert into dim_native_code (nat_id,nat_name) values (967, '也门')
    187. ;insert into dim_native_code (nat_id,nat_name) values (968, '阿曼')
    188. ;insert into dim_native_code (nat_id,nat_name) values (970, '巴勒斯坦')
    189. ;insert into dim_native_code (nat_id,nat_name) values (971, '阿拉伯联合酋长国')
    190. ;insert into dim_native_code (nat_id,nat_name) values (972, '以色列')
    191. ;insert into dim_native_code (nat_id,nat_name) values (973, '巴林')
    192. ;insert into dim_native_code (nat_id,nat_name) values (974, '卡塔尔')
    193. ;insert into dim_native_code (nat_id,nat_name) values (975, '不丹')
    194. ;insert into dim_native_code (nat_id,nat_name) values (976, '蒙古')
    195. ;insert into dim_native_code (nat_id,nat_name) values (977, '尼泊尔')
    196. ;insert into dim_native_code (nat_id,nat_name) values (98 , '伊朗')
    197. ;insert into dim_native_code (nat_id,nat_name) values (992, '塔吉克斯坦')
    198. ;insert into dim_native_code (nat_id,nat_name) values (993, '土库曼斯坦')
    199. ;insert into dim_native_code (nat_id,nat_name) values (994, '阿塞拜疆')
    200. ;insert into dim_native_code (nat_id,nat_name) values (995, '格鲁吉亚')
    201. ;insert into dim_native_code (nat_id,nat_name) values (996, '吉尔吉斯斯坦')
    202. ;insert into dim_native_code (nat_id,nat_name) values (998, '乌兹别克斯坦')
    203. ;insert into dim_native_code (nat_id,nat_name) values (380, '乌克兰')
    204. ;insert into dim_native_code (nat_id,nat_name) values (381, '塞尔维亚')
    205. ;insert into dim_native_code (nat_id,nat_name) values (382, '黑山')
    206. ;insert into dim_native_code (nat_id,nat_name) values (385, '克罗地亚')
    207. ;insert into dim_native_code (nat_id,nat_name) values (386, '斯洛文尼亚')