你可以先用hive或者手写map/reduce程序。建议你直接使用hive,hive也像mysql一样可以建表。表里的数据就是对应从本地load到hadoop上的文件,格式自己定。然后用JDBC可以像操作mysql一样操作hive(sql语法稍有不同)
搜索了一下hive没有实现递归,那么你引用的帖子里的sql那就没法用了。
so,
这个问题可以用自表关联的方法来解决。
多说无益,如下
sql:
select * from (
select b.id,b.name,max(a.score)score from table_a a
join table_a b
where b.id > a.id
and b.score is null
and a.score is not null
group by b.id,b.name
union all
select * from table_a a where score is not null )tt
order by id asc
Hadoop|
Apache Pig|
Apache Kafka|
Apache Storm|
Impala|
Zookeeper|
SAS|
TensorFlow|
人工智能基础|
Apache Kylin|
Openstack|
Flink|
MapReduce|
大数据|
云计算|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....