Skip to main content

Execution information reference

Bundle contents​

PathWhat it is
docker-compose-neo4j.ymlNeo4j, the optional read-only copy, and the backup and restore one-shots
.env.exampleTemplate for .env, the only file you edit
init-env.shWrites .env from .env.example and fills in the required settings: asks, or --generate makes up the passwords. Never changes a value already set
install-execution-logging.shConfigures a Hop project to record into Neo4j
backup.sh, restore.shDump the graph to backups/, load it back
refresh-readonly.shFills the read-only copy from a fresh backup
backups/Where the dumps go
VERSIONThe bundle version, for support requests

.env settings​

SettingDefaultMeaning
NEO4J_PASSWORDrequiredPassword of the neo4j user, which Hop writes with
NEO4J_HTTP_PORT7474Host port of the Neo4j Browser
NEO4J_BOLT_PORT7687Host port Hop writes to
NEO4J_BIND_ADDR127.0.0.1Interface the ports listen on
NEO4J_HTTP_ADVERTISED, NEO4J_BOLT_ADVERTISEDlocalhost:7474, localhost:7687Addresses the Browser connects back to
NEO4J_HEAP_MAX1GNeo4j's maximum heap
GRAPH_NETWORKputki-graph-loggingDocker network; a Hop container on it reaches neo4j:7687
NEO4J_READONLY_PASSWORDPassword of the read-only copy. Required by refresh-readonly.sh
NEO4J_READONLY_HTTP_PORT, NEO4J_READONLY_BOLT_PORT7475, 7688Host ports of the read-only copy
NEO4J_READONLY_BOLT_ADVERTISEDlocalhost:7688Bolt address the copy's Browser connects back to

install-execution-logging.sh options​

OptionDefaultMeaning
--project-home DIRThe Hop project to configure. Without it, every project under $PUTKI_PROJECTS_ROOT (the Putki stack's mode)
--neo4j-host HOSTneo4jWhere Hop reaches Neo4j. localhost for Hop on the same machine
--neo4j-port PORT7687Bolt port
--neo4j-user USERneo4j
--neo4j-password PASSrequired
--neo4j-database NAMEneo4j
--neo4j-tlsEncrypted Bolt, trusting the server's certificate
--connection-name NAMEneo4jName of the graph database connection
--location-name NAMEputki-neo4jName of the execution information location

With PUTKI_NEO4J_EXECUTION_LOGGING=false in its environment, the installer removes what it installed instead.

It writes into the project:

FileRole
metadata/graph-database-connection/neo4j.jsonThe connection, of type Neo4j. Every setting is a ${NEO4J_*} variable
metadata/execution-info-location/putki-neo4j.jsonThe execution information location, of type graph database, using that connection
metadata/*-run-configuration/*.jsonexecutionInfoLocationName set to putki-neo4j where it was empty, local or local-audit
environments/*.jsonThe variables below

Hop variables​

VariableMeaning
NEO4J_HOSTNAME, NEO4J_PORTWhere Neo4j is
NEO4J_USERNAME, NEO4J_PASSWORD, NEO4J_DATABASEHow to sign in, and which database
NEO4J_BOLT_TLStrue for encrypted Bolt, trusting the certificate
HOP_GRAPH_LOGGING_CONNECTIONName of the connection the execution graph is written to; empty or - switches it off

Graph​

ElementWhat it is
(:Execution) with a filenameA run of a pipeline, workflow or transform, from the execution information location: name, executionType, statusDescription, failed, registrationDate, executionStartDate, executionEndDate, loggingText
(:Execution)-[:EXECUTES]->(:Execution)A run started another
(:Execution)-[:HAS_METRIC]->(:ExecutionMetric)A pipeline run's figures per transform: name (the transform), metricKey (Read, Written, Errors, Duration, ...), metricValue
(:Workflow), (:Pipeline), (:Action), (:Transform)The execution graph: ACTION_OF_WORKFLOW, TRANSFORM_OF_PIPELINE, PRECEDES
(:Execution) without a filenameA run, from the execution graph: status, durationMs, linesRead, linesWritten, errors

Queries​

The latest runs:

MATCH (e:Execution)
WHERE e.filename IS NOT NULL AND e.executionType IN ["Pipeline", "Workflow"]
RETURN e.name, e.executionType, e.statusDescription, e.failed, e.registrationDate
ORDER BY e.registrationDate DESC LIMIT 25

Failed runs and their logs:

MATCH (e:Execution)
WHERE e.filename IS NOT NULL AND e.failed = true
RETURN e.name, e.registrationDate, e.loggingText
ORDER BY e.registrationDate DESC LIMIT 10

Rows per transform of a pipeline's runs:

MATCH (:Execution {executionType: "Pipeline", name: "load-orders"})-[:HAS_METRIC]->(m:ExecutionMetric)
RETURN m.name, m.metricKey, m.metricValue

The transforms of each pipeline:

MATCH (p:Pipeline)<-[:TRANSFORM_OF_PIPELINE]-(t:Transform)
RETURN p.name, collect(t.name)