美文网首页
20190710工作进展

20190710工作进展

作者: Songger | 来源:发表于2019-07-10 14:09 被阅读0次
  1. 将udf得到的结果进行title和query的对应

pai -name pytorch -project algo_public_dev -Dpython=3.6 -Dscript="file:///apsarapangu/disk1/hengsong.lhs/origin_deep_cluster_odps_5.tar.gz" -DentryFile="test_query_with_title.py" -Dtables="odps://graph_embedding/tables/hs_heter_graph_embedding_out_nearest_neighbor_006,odps://graph_embedding/tables/hs_jingyan_query_related_video_pool_2_3,odps://graph_embedding/tables/hs_jingyan_query_related_top_query_1" -Doutputs="odps://graph_embedding/tables/hs_query_title_7" -Dbucket="oss://bucket-automl/" -Darn="acs:ram::1293303983251548:role/graph2018" -Dhost="cn-hangzhou.oss-internal.aliyun-inc.com" -DuserDefinedParameters="" -DworkerCount=1;

  1. 得到url
    select get_json_object(body, '$.entities.k0.url/s') from hs_jingyan_query_related_video_pool_2_3 limit 1;

select hs_jingyan_query_related_top_query_1.query from hs_jingyan_query_related_top_query_1 join hs_query_title_6 where hs_query_title_6.index == hs_jingyan_query_related_top_query_1.id limit 10;

hs_query_title_6
hs_jingyan_query_related_top_query_1

select hs_query_title_6.index, hs_query_title_6.query, hs_query_title_6.title_id, hs_query_title_6.title, hs_query_title_6.score, hs_jingyan_query_related_top_query_1.query as origin_query from hs_jingyan_query_related_top_query_1 join hs_query_title_6 where hs_query_title_6.index + 1 == hs_jingyan_query_related_top_query_1.id limit 10;

select a.query, get_json_object(b.body, '$.entities.k0.url/s')
from (
select query,id from hs_jingyan_query_related_top_query_1
)a join (
select * from hs_query_title_6
) b on a.id=b.index;

select get_json_object(body, '$.entities.k0.url/s') as url,hs_query_title_6.index, hs_query_title_6.query, hs_query_title_6.title_id, hs_query_title_6.title, hs_query_title_6.score, hs_jingyan_query_related_top_query_1.query as origin_query from hs_jingyan_query_related_top_query_1 join hs_query_title_6 where hs_query_title_6.index + 1 == hs_jingyan_query_related_top_query_1.id limit 10;

hs_jingyan_query_related_video_pool_2_3:id
hs_test_3:title_id

create table hs_result_title_query_1w as
select index, origin_query, query, title_id, title, score, url_k2, url_k3
from (
select get_json_object(body, '.entities.k2.play_url/s') as url_k2,get_json_object(body, '.entities.k3.play_url/s') as url_k3,id from hs_jingyan_query_related_video_pool_2_3
)a join (
select * from hs_test_3
) b on a.id=b.title_id;

select get_json_object(body, '$.entities.k3.play_url/s') as url from hs_jingyan_query_related_video_pool_2_3 where id == 212099128936;

  1. 叶子类目数据处理:
    select id, title from hs_jingyan_query_related_video_pool_2_3 where title in (select title from hs_jingyan_query_related_video_pool_2_3 limit 100);

select item_id,title, cate_id, cate_name,cate_level from tbcdm.dim_tb_itm where ds=max_pt('tbcdm.dim_tb_itm') and title == '买一送一冬季棉拖鞋女室内家居情侣保暖厚底居家用毛绒包跟棉鞋男';

select distinct cate_name from tbcdm.dim_tb_itm where ds=max_pt('tbcdm.dim_tb_itm') and title == '买一送一冬季棉拖鞋女室内家居情侣保暖厚底居家用毛绒包跟棉鞋男';

create table hs_result_title_query_1w as
select distinct cate_name from tbcdm.dim_tb_itm where ds=max_pt('tbcdm.dim_tb_itm') and title in (select title from hs_jingyan_query_related_video_pool_2_3 limit 2);

  1. 构造title和叶子类目的联系表

create table hs_leaf_class_for_title as
select * from (select distinct title as title_tb, cate_id, cate_name,cate_level from tbcdm.dim_tb_itm where ds=max_pt('tbcdm.dim_tb_itm') and title in (select title from hs_jingyan_query_related_video_pool_2_3))a join (select * from hs_jingyan_query_related_video_pool_2_3)b on a.title_tb == b.title;

http://logview.odps.aliyun-inc.com:8080/logview/?h=http://service-corp.odps.aliyun-inc.com/api&p=graph_embedding&i=2019071011411420gzx5j859&token=c2xwd0RBVVQ5MzlWeDNpMFpsdnE3a1F0SzVRPSxPRFBTX09CTzoxMjkzMzAzOTgzMjUxNTQ4LDE1NjMzNjM2NzQseyJTdGF0ZW1lbnQiOlt7IkFjdGlvbiI6WyJvZHBzOlJlYWQiXSwiRWZmZWN0IjoiQWxsb3ciLCJSZXNvdXJjZSI6WyJhY3M6b2RwczoqOnByb2plY3RzL2dyYXBoX2VtYmVkZGluZy9pbnN0YW5jZXMvMjAxOTA3MTAxMTQxMTQyMGd6eDVqODU5Il19XSwiVmVyc2lvbiI6IjEifQ==

相关文章

  • 20190710工作进展

    将udf得到的结果进行title和query的对应 pai -name pytorch -project algo...

  • 20190710

    绝望里窥探到美好,一丝的,气若游丝般的…美好里瞥眼到绝望,致命的,无懈可击般的……于她,是幸福的。 听,宋冬野~平...

  • 20190710

    明天下午出发去五台山,年休假办理妥当,手头工作全部处理好。想必在外的这几天应该没有太多的电话。 晚上要和老同事见个...

  • 20190710

    一个年轻人坐在家里时外面下起了可怕的暴雨。没过几个小时,这个年轻人家的房子也开始被淹了,这时有人来到他的门前,想开...

  • 20190710

    今日复盘 今天做了什么事情呢?第1把工作理顺了,GPS工作对接,完成的还可以;第二,向领导反映情况,一开始自己语言...

  • 20190710

    事件记录 今天的主题是考级。其实我内心来说觉得考级无所谓,又不加分了。但老师说一是检验学习效果,二是给女儿考试的体...

  • 20190710

    这两天一直在为论文焦虑,明显感觉了到与导师的knowledge gap,导致有时候没法准确理解导师的意思,而且连文...

  • 营养早餐(20190710)

    《正面管教》 作者:[美] 简·尼尔森 (Jane Nelsen) 营养早餐(20190710) ——【美国】简·...

  • 日记20190710

    今天冒着大雨去培训机构把蒙特梭利教师证报名的钱交了,下了最后的决定,没有退路了。内心还是有些对未来充满了不确定性,...

  • 日常|20190710

    前天通知,这两天上班必须全着工装。今天从路上到食堂到办公室,满眼全是工装,分外耀眼的还有部分人胸前红艳艳的D徽。演...

网友评论

      本文标题:20190710工作进展

      本文链接:https://www.haomeiwen.com/subject/bjpckctx.html