Skip to content

Knowledge graph post create CSV hook script

Introduction

The knowledge graph post create CSV hook script is intended to be used to migrate CSV files between servers in a multi-server environment; for example, when the knowledge graph CSV files are on one server and the Neo4j database is located in a different server.

If KnowledgeGraphPostCreateCsvScript.groovy exists, it will be executed after the knowledge graph process finishes creating CSV files. This script can also be used to define custom logic to be executed after the knowledge graph process finishes creating CSV files.

Location

KnowledgeGraphPostCreateCsvScript.groovy can be set globally, in collection level or in profile level.

  • If KnowledgeGraphPostCreateCsvScript.groovy is specified in the $SEARCH_HOME/conf folder, it will affect all the collections.
  • If it is specified in the $SEARCH_HOME/conf/$COLLECTION_NAME folder, it will affect only that particular collection and its profiles.
  • If it is specified in the $SEARCH_HOME/conf/$COLLECTION_NAME/$PROFILE_NAME folder, it will affect only that particular profile.

Examples

import com.funnelback.common.profile.ProfileAndView

class postCreateCsvScript implements com.funnelback.cortex.integration.hookScriptRunner.postCreateCsv.PostCreateCsvTrigger{
    @Override
    boolean activate(String collectionId, ProfileAndView profileAndView) {
        // your logic goes here
        return true // return success or failure
    }
}

Caveats

The rest of the knowledge graph update process will be terminated if this script returns false.

top

Funnelback logo
v15.24.0