forked from D-Net/dnet-hadoop
[patents] added test and resources
This commit is contained in:
parent
821700299a
commit
189a7c255a
|
@ -173,24 +173,13 @@ public class PrepareResultCommunitySetStep1 {
|
||||||
"AND lower(co.id) IN " + communityIdList,
|
"AND lower(co.id) IN " + communityIdList,
|
||||||
"AND lower(relClass) IN " + allowedsemrel);
|
"AND lower(relClass) IN " + allowedsemrel);
|
||||||
Dataset<Row> result_context = spark.sql(resultContextQuery);
|
Dataset<Row> result_context = spark.sql(resultContextQuery);
|
||||||
//result_context.createOrReplaceTempView("result_context");
|
|
||||||
|
|
||||||
// spark
|
|
||||||
// .sql(RESULT_COMMUNITY_LIST_QUERY)
|
|
||||||
// .as(Encoders.bean(ResultCommunityList.class))
|
|
||||||
// .write()
|
|
||||||
// .option("compression", "gzip")
|
|
||||||
// .mode(SaveMode.Overwrite)
|
|
||||||
// .json(outputResultPath);
|
|
||||||
|
|
||||||
Dataset<Row> rwc = spark.sql(String.format(RESULT_WITH_CONTEXT, communityIdList));
|
Dataset<Row> rwc = spark.sql(String.format(RESULT_WITH_CONTEXT, communityIdList));
|
||||||
Dataset<Row> patents = spark.sql(RESULT_PATENT);
|
Dataset<Row> patents = spark.sql(RESULT_PATENT);
|
||||||
Dataset<Row> relatedToRelations = spark.sql(IS_RELATED_TO_RELATIONS);
|
Dataset<Row> relatedToRelations = spark.sql(IS_RELATED_TO_RELATIONS);
|
||||||
|
|
||||||
rwc.createOrReplaceTempView("resultWithContext");
|
rwc.createOrReplaceTempView("resultWithContext");
|
||||||
|
|
||||||
patents.createOrReplaceTempView("patents");
|
patents.createOrReplaceTempView("patents");
|
||||||
|
|
||||||
relatedToRelations.createOrReplaceTempView("relatedTorelations");
|
relatedToRelations.createOrReplaceTempView("relatedTorelations");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -326,4 +326,6 @@ public class ResultToCommunityJobTest {
|
||||||
Assertions.assertEquals(1, communities.size());
|
Assertions.assertEquals(1, communities.size());
|
||||||
Assertions.assertEquals("dh-ch", communities.get(0));
|
Assertions.assertEquals("dh-ch", communities.get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue