From eaaefb8b4ce3523fdec4f57df44db316167a011c Mon Sep 17 00:00:00 2001 From: miconis Date: Tue, 6 Apr 2021 14:35:51 +0200 Subject: [PATCH] implementation of the procedure to reuse content of different dbs when creating the raw graph --- .../raw/MigrateDbEntitiesApplication.java | 4 +- .../oa/graph/raw_all/oozie_app/workflow.xml | 148 +++++++++++++----- 2 files changed, 109 insertions(+), 43 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplication.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplication.java index 270c90913..f61ab779d 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplication.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplication.java @@ -161,7 +161,7 @@ public class MigrateDbEntitiesApplication extends AbstractMigrationApplication i .execute( "queryProjectOrganization.sql", smdbe::processProjectOrganization, verifyNamespacePrefix); break; - case openorgs_dedup: + case openorgs_dedup: //generates organization entities and relations for openorgs dedup log.info("Processing Openorgs..."); smdbe .execute( @@ -172,7 +172,7 @@ public class MigrateDbEntitiesApplication extends AbstractMigrationApplication i break; - case openorgs: + case openorgs: //generates organization entities and relations for provision log.info("Processing Openorgs For Provision..."); smdbe .execute( diff --git a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/raw_all/oozie_app/workflow.xml b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/raw_all/oozie_app/workflow.xml index ea12171e9..80f33bd53 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/raw_all/oozie_app/workflow.xml +++ b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/raw_all/oozie_app/workflow.xml @@ -6,14 +6,39 @@ the target path to store raw graph - reuseContent + reuseDBClaims false should import content from the aggregator or reuse a previous version - importOpenorgs - true - should import content from the OpenOrgs database + reuseODFClaims + false + should import content from the aggregator or reuse a previous version + + + reuseOAFClaims + false + should import content from the aggregator or reuse a previous version + + + reuseDB + false + should import content from the aggregator or reuse a previous version + + + reuseDBOpenorgs + false + should import content from the aggregator or reuse a previous version + + + reuseODF + false + should import content from the aggregator or reuse a previous version + + + reuseOAF + false + should import content from the aggregator or reuse a previous version contentPath @@ -120,25 +145,26 @@ - + Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}] - + + + + + + + - ${wf:conf('reuseContent') eq false} - ${wf:conf('reuseContent') eq true} - + ${wf:conf('reuseDBClaims') eq false} + ${wf:conf('reuseDBClaims') eq true} + - - - - - @@ -154,10 +180,18 @@ --dbschema${dbSchema} --nsPrefixBlacklist${nsPrefixBlacklist} - + + + + ${wf:conf('reuseODFClaims') eq false} + ${wf:conf('reuseODFClaims') eq true} + + + + @@ -171,10 +205,18 @@ -lstore -iclaim - + + + + ${wf:conf('reuseOAFClaims') eq false} + ${wf:conf('reuseOAFClaims') eq true} + + + + @@ -192,6 +234,14 @@ + + + ${wf:conf('reuseDB') eq false} + ${wf:conf('reuseDB') eq true} + + + + @@ -207,37 +257,18 @@ --dbschema${dbSchema} --nsPrefixBlacklist${nsPrefixBlacklist} - + - + - ${wf:conf('importOpenorgs') eq true} - ${wf:conf('importOpenorgs') eq false} - + ${wf:conf('reuseODF') eq false} + ${wf:conf('reuseODF') eq true} + - - - - - - eu.dnetlib.dhp.oa.graph.raw.MigrateDbEntitiesApplication - --hdfsPath${contentPath}/db_openorgs - --postgresUrl${postgresOpenOrgsURL} - --postgresUser${postgresOpenOrgsUser} - --postgresPassword${postgresOpenOrgsPassword} - --isLookupUrl${isLookupUrl} - --actionopenorgs - --dbschema${dbSchema} - --nsPrefixBlacklist${nsPrefixBlacklist} - - - - - @@ -251,10 +282,18 @@ --mdLayoutstore --mdInterpretationcleaned - + + + + ${wf:conf('reuseOAF') eq false} + ${wf:conf('reuseOAF') eq true} + + + + @@ -289,6 +328,33 @@ + + + ${wf:conf('reuseDBOpenorgs') eq false} + ${wf:conf('reuseDBOpenorgs') eq true} + + + + + + + + + + eu.dnetlib.dhp.oa.graph.raw.MigrateDbEntitiesApplication + --hdfsPath${contentPath}/db_openorgs + --postgresUrl${postgresOpenOrgsURL} + --postgresUser${postgresOpenOrgsUser} + --postgresPassword${postgresOpenOrgsPassword} + --isLookupUrl${isLookupUrl} + --actionopenorgs + --dbschema${dbSchema} + --nsPrefixBlacklist${nsPrefixBlacklist} + + + + +