#百面机器学习

大数据学习——面试用sql——累计报表

createtablet_access_times(usernamestring,monthstring,salaryint)rowformatdelimitedfieldsterminatedby',';loaddatalocalinpath'/root/hivedata/t_access_times.dat'int...

大数据学习——hive函数

1内置函数测试各种内置函数的快捷方法:1、创建一个dual表createtabledual(idstring);2、load一个文件(一行,一个空格)到dual表3、selectsubstr('angelababy',2,3)fromdual; 2自定义函数UDF(user-definedfunction)和...
代码星球 代码星球·2021-02-17

大数据学习——hive数据类型

1.hive的数据类型Hive的内置数据类型可以分为两大类:(1)、基础数据类型;(2)、复杂数据类型2.hive基本数据类型基础数据类型包括:TINYINT,SMALLINT,INT,BIGINT,BOOLEAN,FLOAT,DOUBLE,STRING,BINARY,TIMESTAMP,DECIMAL,CHAR,VA...
代码星球 代码星球·2021-02-17

大数据学习——关于hive中的各种join

准备数据2,b3,c4,d7,y8,u2,bb3,cc7,yy9,pp建表:createtablea(idint,namestring)rowformatdelimitedfieldsterminatedby',';createtableb(idint,namestring)rowformatdelimitedfiel...

大数据学习——hive的sql练习

 1新建一个数据库createdatabasedb3;2创建一个外部表--外部表建表语句示例:createexternaltablestudent_ext(Snoint,Snamestring,Sexstring,Sageint,Sdeptstring)rowformatdelimitedfieldsterm...

大数据学习——hive显示命令

1showdatabases;2desct_partition001;3descextendedt_partition002;4descformattedt_partition002;5!clear;6!ls;7dfs-ls/;2DML操作loadloaddatalocalinpath'/root/hivedata/t...

大数据学习——hive数仓DML和DDL操作

1创建一个分区表createtablet_partition001(ipstring,durationint)partitionedby(countrystring)rowformatdelimitedfieldsterminatedby',';2添加数据loaddatalocalinpath'/root/hiveda...

大数据学习——hive基本操作

1建表createtablestudent(idint,namestring,ageint)rowformatdelimitedfieldsterminatedby',';2创建一个student.txt添加数据1,zhangsan,102,lisi,203,wnagwu,253上传hdfsdfs-putstudent...

大数据学习——hive使用

Hive交互shellbin/hive HiveJDBC服务hive也可以启动为一个服务器,来对外提供  启动方式,(假如是在itcast01上):启动为前台:bin/hiveserver2启动为后台:nohupbin/hiveserver21>/var/log/hiveserver...
代码星球 代码星球·2021-02-17

大数据学习——hive安装部署

1上传压缩包2解压 tar-zxvfapache-hive-1.2.1-bin.tar.gz-Capps 3重命名mv apache-hive-1.2.1-binhive 4设置环境变量vi/etc/profileexpertHIVE_HOME=/root/apps/hiveex...

大数据学习——日志分析

有两个海量日志文件存储在hdfs上,其中登陆日志格式:user,ip,time,oper(枚举值:1为上线,2为下线);访问之日格式为:ip,time,url,假设登陆日志中上下线信息完整,切同一上下线时间段内是用的ip唯一,计算访问日志中独立user数量最多的前10个url,用MapReduce实现。提示:1、要统计...
代码星球 代码星球·2021-02-17

大数据学习——mapreduce运营商日志增强

需求1、对原始json数据进行解析,变成普通文本数据2、求出每个人评分最高的3部电影3、求出被评分次数最多的3部电影 数据https://pan.baidu.com/s/1gPsQXVYSQEZ2OYek4HxK6Apom.xml<?xmlversion="1.0"encoding="UTF-8"?&g...

大数据学习——mapreduce学习topN问题

  求每一个订单中成交金额最大的那一笔 top1数据Order_0000001,Pdt_01,222.8Order_0000001,Pdt_05,25.8Order_0000002,Pdt_05,325.8Order_0000002,Pdt_03,522.8Order_0000002,Pd...

大数据学习——mapreduce案例join算法

需求:用mapreduce实现selectorder.orderid,order.pdtid,pdts.pdt_name,oder.amountfromorderjoinpdtsonorder.pdtid=pdts.pdtid 数据:orders.txtOrder_0000001,pd001,222.8Ord...

大数据学习——mapreduce共同好友

数据 commonfriends.txtA:B,C,D,F,E,OB:A,C,E,KC:F,A,D,ID:A,E,F,LE:B,C,D,M,LF:A,B,C,D,E,O,MG:A,C,D,E,FH:A,C,D,E,OI:A,OJ:B,OK:A,C,DL:D,E,FM:E,F,GO:A,H,I,J &...
首页上一页...1920212223...下一页尾页