|
@@ -35,6 +35,7 @@ object makedata_02_writeredis {
|
|
|
val partition = partitionPrefix + date
|
|
|
val savePathUser = param.getOrDefault("savePathUser", "")
|
|
|
val savePathVideo = param.getOrDefault("savePathVideo", "")
|
|
|
+ val userSampleIDs = param.getOrDefault("userSampleIDs", "").split(",").toList
|
|
|
|
|
|
|
|
|
|
|
@@ -52,6 +53,9 @@ object makedata_02_writeredis {
|
|
|
if (ifUser){
|
|
|
println("user特征处理")
|
|
|
var userData = odpsOps.readTable(project = project, table = tableUser, partition = partition, transfer = handleUser, numPartition = tablePart)
|
|
|
+ if (userSampleIDs.nonEmpty){
|
|
|
+ userData = userData.filter(r => userSampleIDs.contains(r._1.hashCode % 10))
|
|
|
+ }
|
|
|
if (ifDebug){
|
|
|
println("user特征处理-debug开启-只保留5条数据-特征数量大于1")
|
|
|
val userDataTake = userData.filter(_._3 > 1).take(5)
|