[Swift-commit] r2986 - provenancedb

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Jun 30 07:37:30 CDT 2009


Author: benc
Date: 2009-06-30 07:37:30 -0500 (Tue, 30 Jun 2009)
New Revision: 2986

Modified:
   provenancedb/prepare-provenance-chart
   provenancedb/prov-to-sql.sh
Log:
import @functions

Modified: provenancedb/prepare-provenance-chart
===================================================================
--- provenancedb/prepare-provenance-chart	2009-06-30 12:37:10 UTC (rev 2985)
+++ provenancedb/prepare-provenance-chart	2009-06-30 12:37:30 UTC (rev 2986)
@@ -28,3 +28,14 @@
 info-to-extrainfo > extrainfo.txt
 
 cat $1 | grep ' OPERATOR ' | sed 's/^.*thread=\([^ ]*\) operator="\([^ ]*\)" lhs=\([^ ]*\) rhs=\([^ ]*\) result=\([^ ]*\).*$/\1 \2 \3 \4 \5/' > operators.txt
+
+
+# 2009-03-19 19:15:35,244+0100 INFO  vdl:arguments FUNCTION id=88000-0-4-4 name="f ilename" result=tag:benc at ci.uchicago.edu,2008:swift:dataset:20090319-1915-xj8flg 13:720000000060
+# 2009-03-19 19:15:35,246+0100 INFO  vdl:arguments FUNCTIONPARAMETER id=88001-0-4- 4 input=tag:benc at ci.uchicago.edu,2008:swift:dataset:20090319-1915-xj8flg13:72000 0000058
+
+cat $1 | grep ' FUNCTION ' | sed "s/^.*id=\([^ ]*\) name=\([^ ]*\) result=\([^ ]*\).*\$/$WFID\1 \2 \3/" > functions.txt
+# the IDs in functions.txt should be unique...
+# we could even test that...
+
+cat $1 | grep ' FUNCTIONPARAMETER ' | sed "s/^.*id=\([^ ]*\) input=\([^ ]*\).*\$/$WFID\1 \2/" > function-inputs.txt
+

Modified: provenancedb/prov-to-sql.sh
===================================================================
--- provenancedb/prov-to-sql.sh	2009-06-30 12:37:10 UTC (rev 2985)
+++ provenancedb/prov-to-sql.sh	2009-06-30 12:37:30 UTC (rev 2986)
@@ -35,6 +35,17 @@
   OPERATORIDCOUNTER=$(( $OPERATORIDCOUNTER + 1))
 done < operators.txt
 
+while read id name output; do
+  echo "INSERT INTO processes (id, type) VALUES ('$id', 'function');" >> tmp-import.sql
+  echo "INSERT INTO dataset_usage (process_id, direction, dataset_id, param_name) VALUES ('$id', 'O', '$output', 'result');" >> tmp-import.sql
+  echo "INSERT INTO invocation_procedure_names (execute_id, procedure_name) VALUES ('$id', '$name');" >> tmp-import.sql
+done < functions.txt
+
+while read id value; do
+# TODO need ordering/naming
+  echo "INSERT INTO dataset_usage (process_id, direction, dataset_id, param_name) VALUES ('$id', 'I', '$value', 'undefined');" >> tmp-import.sql
+done < function-inputs.txt
+
 while read thread direction dataset variable rest; do 
   if [ "$direction" == "input" ] ; then
     dir=I




More information about the Swift-commit mailing list