1
0
Fork 0

[patents] added test and resources

This commit is contained in:
Miriam Baglioni 2024-11-25 16:52:13 +01:00
parent 821700299a
commit 189a7c255a
2 changed files with 2 additions and 11 deletions

View File

@ -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");

View File

@ -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));
} }
} }