Skip to content

Commit 30b436a

Browse files
committed
Add path to cypher source reference in csv reports
1 parent 90cffac commit 30b436a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/executeQuery.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ fi
102102
if [ "${no_source_reference}" = true ] ; then
103103
echo -n "${cyper_query_result}" | jq -r '(.results[0])? | .columns,(.data[].row)? | map(if type == "array" then join(",") else . end) | flatten | @csv'
104104
else
105-
cypher_query_file_basename=$(basename -- "${cypher_query_file_name}")
106-
sourceFileReferenceInfo="Source Cypher File: ${cypher_query_file_basename}"
105+
cypher_query_file_relative_name=${cypher_query_file_name#/**/cypher/}
106+
sourceFileReferenceInfo="Source Cypher File: ${cypher_query_file_relative_name}"
107107
echo -n "${cyper_query_result}" | jq -r --arg sourceReference "${sourceFileReferenceInfo}" '(.results[0])? | .columns + [$sourceReference], (.data[].row)? + [""] | map(if type == "array" then join(",") else . end) | flatten | @csv'
108108
fi

0 commit comments

Comments
 (0)