Hive离线选品推荐
来自CloudWiki
Hive离线选品推荐
1.我们先展示一条源数据,以逗号分割
字段意思:商品页数,一级分类,二级分类,三级分类,商品图片,商品名称,商品价格,商品价格范围,商品单位,公司名称,公司网址,地址,"几年老店",标签
字段名:productId,productPage,categoryOne,categoryTwo,categoryThr,productImg,productName,productPrice,productPrices,productUnit,companyName,companyUrl,address,year,tags
1,1,Apparel_Textiles & Accessories,Apparel,Apparel Design Services,//s.alicdn.com/@sc01/kf/H50cfdfc8a6c4445ab6f3a926a2542c00t.jpg_300x300.jpg,embroidery digitizing 24h on line,1,$1.00-$2.00,Unit,Shen Zhen Happitoo Textile Co._ Ltd.,//happitoo.en.alibaba.com/company_profile.html#top-nav-bar,China,1,Apparel Design Apparel_Textessories Services;
首先在hive创建表名称为"data"
create table data( productId string, productPage int, categoryOne string, categoryTwo string, categoryThr string, productImg string, productName string, productPrice string, productPrices string, productUnit string, companyName string, companyUrl string, address string, year int, tags string) row format delimited fields terminated by ',';