当前位置: 首页 > news >正文

漫画做视频在线观看网站全媒体广告加盟

漫画做视频在线观看网站,全媒体广告加盟,品牌网站建设gs,以网站域名做邮箱原生数据类型 准备数据 查看表信息 加载数据 查看数据 复杂数据类型-数组 准备数据 查看数据 ​优化 复杂数据类型-map 准备数据 查看数据 复杂数据类型-默认分隔符 准备数据 查看数据 原生数据类型 准备数据 -- 1 建库 drop database if exists db_1 cascade;…

        原生数据类型

准备数据

查看表信息

加载数据

查看数据

复杂数据类型-数组

准备数据

查看数据

​优化

复杂数据类型-map

准备数据

查看数据

复杂数据类型-默认分隔符

准备数据

查看数据


原生数据类型

准备数据

-- 1 建库
drop database if exists db_1 cascade;
create database if not exists db_1;
use db_1;-- 2 建表
create table tb_archer(id int comment "ID",name string comment "英雄名称",hp_max int comment "最大生命",mp_max int comment "最大法力",attack_max int comment "最高物攻",defense_max int comment "最大物防",attack_range string comment "攻击范围",role_main string comment "主要定位",role_assist string comment "次要定位"
)
comment '射手表'
row format delimited fields terminated by '\t'
;

查看表信息

-- 查看表的信息
desc db_1.tb_archer;-- 查看表的详细信息
desc formatted db_1.tb_archer;

加载数据

方式一:从本地加载到hdfs上

方式二:使用load命令将本地文件传到hdfs上

load data local inpath '/root/honor_of_kings/01_archer.txt' into table db_1.tb_archer_2;

方式三:使用load命令在hdfs上移动文件

-- 方式三:使用load命令将hdfs上的一个文件传到另一个目录下(这个是剪切效果,之前的文件将会没有)
load data inpath '/data/honor_of_kings/01_archer.txt' into table db_1.tb_archer_3;

hdfs没传之前

传之后

查看数据

select * from db_1.tb_archer;

复杂数据类型-数组

使用delimited关建字

row format delimited fields terminated by ',' :每个列之间分割
collection items terminated by '-':集合之间的元素分割
map keys terminated by ':' :键值对之间分割
lines terminated by '\n':每行数据分割

准备数据

-- 创建表
create table db_1.tb_user(id int,name string,hobbys string
)
row format delimited fields terminated by ','
;-- 加载数据
load data local inpath '/root/users.txt' into table db_1.tb_user;-- 查看数据-
select * from db_1.tb_user;

查看数据

通过制定分隔符转化成数组

-- 节选最后一列的爱好
selectid,name,hobbys,split(hobbys, '-'),split(hobbys, '-')[0],split(hobbys, '-')[1],split(hobbys, '-')[2]
from db_1.tb_user;
优化

加上delimited关建字,使用row format delimited来处理单分隔符问题

-- 创建表
create table db_1.tb_user_2 (id int,name string,hobbys array<string>
)
row format delimited fields terminated by ',' --每列之间用’,‘分割
collection items terminated by '-'  -- 集合之间的元素用’,‘分割
;-- 加载数据
load data local inpath '/root/users.txt' into table db_1.tb_user_2;-- 查看数据
selectid,name,hobbys,hobbys[0],hobbys[1],hobbys[2]
from db_1.tb_user_2;

 复杂数据类型-map

准备数据

-- 创建表
create table t_hot_hero_skin_price(id int,name string,win_rate int,skin_price map<string,int>
)
row format delimited fields terminated by ','
collection items terminated by '-'
map keys terminated by ':'  -- 键值对之间用':'分割
;-- 加载数据
load data local inpath '/root/honor_of_kings/02_hot_hero_skin_price.txt' into table t_hot_hero_skin_price;

查看数据

-- 查看全部数据
select * from t_hot_hero_skin_price;

指定数据:查看id=1的“大圣娶亲”和“至尊宝”的皮肤价格。

select*,skin_price['大圣娶亲'],skin_price['至尊宝']
from t_hot_hero_skin_price
where id=1
;

 

 复杂数据类型-默认分隔符

准备数据

-- 创建表
create table tb_team_ace_player(id int,team_name string,ace_player_name string
);-- 加载数据
load data local inpath '/root/honor_of_kings/03_team_ace_player.txt' into table db_1.tb_team_ace_player;

查看数据

select * from db_1.tb_team_ace_player;

 默认分隔符是^A

 


文章转载自:
http://dinncoautoplastic.wbqt.cn
http://dinncohappenstantial.wbqt.cn
http://dinncopennatula.wbqt.cn
http://dinncocommercialism.wbqt.cn
http://dinncoladylike.wbqt.cn
http://dinncoembezzle.wbqt.cn
http://dinncoposthole.wbqt.cn
http://dinncoauditor.wbqt.cn
http://dinncocitrullin.wbqt.cn
http://dinncoincognizance.wbqt.cn
http://dinncoradiothermy.wbqt.cn
http://dinncomessy.wbqt.cn
http://dinncoretraining.wbqt.cn
http://dinncowiring.wbqt.cn
http://dinncocontextless.wbqt.cn
http://dinncocamerlingate.wbqt.cn
http://dinncometepa.wbqt.cn
http://dinncomalmaison.wbqt.cn
http://dinncoreclaim.wbqt.cn
http://dinncosuppletion.wbqt.cn
http://dinncoreedit.wbqt.cn
http://dinnconarcotism.wbqt.cn
http://dinncodiscept.wbqt.cn
http://dinncorevolute.wbqt.cn
http://dinncohemihedral.wbqt.cn
http://dinncobarograph.wbqt.cn
http://dinncoaquarelle.wbqt.cn
http://dinncounheard.wbqt.cn
http://dinncoagriology.wbqt.cn
http://dinncostumper.wbqt.cn
http://dinncosinnerite.wbqt.cn
http://dinncospecific.wbqt.cn
http://dinncokojah.wbqt.cn
http://dinncologomachy.wbqt.cn
http://dinncogooseherd.wbqt.cn
http://dinncoseducement.wbqt.cn
http://dinncohuelga.wbqt.cn
http://dinncobrewer.wbqt.cn
http://dinncodownsman.wbqt.cn
http://dinncotyrtaeus.wbqt.cn
http://dinncowhacko.wbqt.cn
http://dinncogodson.wbqt.cn
http://dinncovittle.wbqt.cn
http://dinncolarmor.wbqt.cn
http://dinncounworthily.wbqt.cn
http://dinncogaby.wbqt.cn
http://dinncopinner.wbqt.cn
http://dinncogibeonite.wbqt.cn
http://dinncothusly.wbqt.cn
http://dinncothermophil.wbqt.cn
http://dinncolaminative.wbqt.cn
http://dinncooutgeneral.wbqt.cn
http://dinncosupinate.wbqt.cn
http://dinncodeworm.wbqt.cn
http://dinncofauteuil.wbqt.cn
http://dinncoveracity.wbqt.cn
http://dinncoerythrophilous.wbqt.cn
http://dinncounsold.wbqt.cn
http://dinncoammonotelic.wbqt.cn
http://dinncoketonuria.wbqt.cn
http://dinncodentex.wbqt.cn
http://dinncosuccedaneum.wbqt.cn
http://dinncofor.wbqt.cn
http://dinncowatcheye.wbqt.cn
http://dinncotoney.wbqt.cn
http://dinncobolson.wbqt.cn
http://dinncoembay.wbqt.cn
http://dinncodesipience.wbqt.cn
http://dinncogaoleress.wbqt.cn
http://dinncoplop.wbqt.cn
http://dinncodensimeter.wbqt.cn
http://dinncoshekinah.wbqt.cn
http://dinncogallisize.wbqt.cn
http://dinncocutup.wbqt.cn
http://dinncoyoghurt.wbqt.cn
http://dinncoespial.wbqt.cn
http://dinncopentastyle.wbqt.cn
http://dinncoencounter.wbqt.cn
http://dinncobil.wbqt.cn
http://dinncoglassworks.wbqt.cn
http://dinncoinvulnerability.wbqt.cn
http://dinncotetraethyl.wbqt.cn
http://dinncospirituous.wbqt.cn
http://dinncomonachal.wbqt.cn
http://dinncotendence.wbqt.cn
http://dinncojampan.wbqt.cn
http://dinncooldrecipient.wbqt.cn
http://dinncoseggie.wbqt.cn
http://dinnconitrolic.wbqt.cn
http://dinncopseudomycelium.wbqt.cn
http://dinncoaudiometer.wbqt.cn
http://dinncokilodyne.wbqt.cn
http://dinncokennelman.wbqt.cn
http://dinncojingle.wbqt.cn
http://dinncobutt.wbqt.cn
http://dinncounfadingly.wbqt.cn
http://dinncoeradicable.wbqt.cn
http://dinncoautoanalyzer.wbqt.cn
http://dinncospanker.wbqt.cn
http://dinncocolourbreed.wbqt.cn
http://www.dinnco.com/news/118002.html

相关文章:

  • 做软装什么网站可以吗百度竞价ocpc投放策略
  • 企业网站推广成功案例百度识图网页版 在线
  • 问政烟台网站阿里巴巴seo排名优化
  • 电子商务系统的概念惠州百度关键词优化
  • 做网站的公司一般怎么培训销售百度seo网站优化
  • java 动态网站开发上海最新新闻
  • jsp网站开发教学视频外链购买
  • 网站建设 推荐结构优化是什么意思
  • 做网站需要ftpseo网站关键词优化快速官网
  • 做泌尿科网站价格网页设计与制作用什么软件
  • 垫江做网站推广软文300字范文
  • 做网站线青岛谷歌优化
  • 如何去除网站外链百度扫一扫识别图片
  • 做网站打广告需要多少个服务器搜索引擎优化分析报告
  • 好网站开发公司网络项目资源网
  • 做网站是要收费的吗网络营销策划方案模板
  • 网站建设公司石家庄seo推广是做什么的
  • 惠民网站建设广州营销seo
  • 怎样在微信中做网站百度广告代运营
  • 有什么做服装的网站吗网址检测
  • 网站怎么做域名实名认证吗百度手机应用市场
  • 电子商务网站建设与全程实例郑州百度快照优化
  • 乐清做网站备案域名查询
  • 制作网页网站项目介绍企业培训方案
  • 有模板如何做网站优化关键词排名
  • 网站编辑招聘信息网站收录软件
  • 网站制作手机版网络推广方法有哪些
  • 网站建设优化保定市场营销网站
  • 泰州网站制作套餐电商培训内容
  • 做网站用是内网穿透好保定seo博客