[Swift-commit] r2987 - provenancedb

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


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

Modified:
   provenancedb/prov-init.sql
   provenancedb/prov-to-sql.sh
Log:
rename executes_in_workflows to processes_in_workflows,
and implement.

Modified: provenancedb/prov-init.sql
===================================================================
--- provenancedb/prov-init.sql	2009-06-30 12:37:30 UTC (rev 2986)
+++ provenancedb/prov-init.sql	2009-06-30 12:37:51 UTC (rev 2987)
@@ -9,18 +9,20 @@
 DROP TABLE invocation_procedure_names;
 DROP TABLE dataset_containment;
 DROP TABLE dataset_filenames;
-DROP TABLE executes_in_workflows;
+DROP TABLE processes_in_workflows;
 DROP TABLE dataset_values;
 DROP TABLE known_workflows;
 DROP TABLE workflow_events;
 DROP TABLE extrainfo;
 
 
--- executes_in_workflow is unused at the moment, but is intended to associate
--- each execute with its containing workflow
-CREATE TABLE executes_in_workflows
+-- associates each process with its containing workflow
+-- TODO - perhaps a workflow is itself a big big process?
+-- in which case this looks very much like a compound/app
+-- containment?
+CREATE TABLE processes_in_workflows
     (workflow_id char(128),
-     execute_id char(128)
+     process_id char(128)
     );
 
 -- processes gives information about each process (in the OPM sense)
@@ -155,6 +157,6 @@
 
 -- this GRANT does not work for sqlite; you'll get a syntax error but
 -- ignore it, as it is not needed in sqlite
-grant all on dataset_containment, dataset_filenames, dataset_usage, executes_in_workflows, invocation_procedure_names, known_workflows, workflow_events to public, operators;
+grant all on dataset_containment, dataset_filenames, dataset_usage, processes_in_workflows, invocation_procedure_names, known_workflows, workflow_events to public, operators;
 
 

Modified: provenancedb/prov-to-sql.sh
===================================================================
--- provenancedb/prov-to-sql.sh	2009-06-30 12:37:30 UTC (rev 2986)
+++ provenancedb/prov-to-sql.sh	2009-06-30 12:37:51 UTC (rev 2987)
@@ -5,12 +5,16 @@
 
 export WFID="tag:benc at ci.uchicago.edu,2008:swiftlogs:execute:${RUNID}:"
 
+# TODO is there already a URI form for identifying workflows?
+export WF="tag:benc at ci.uchicago.edu,2008:swiftlogs:execute:${RUNID}:run"
+
 echo Generating SQL for $RUNID
 
 rm -f tmp-import.sql
 
 while read time duration thread localthread endstate app scratch; do
   echo "INSERT INTO processes (id, type) VALUES ('$thread', 'execute');" >> tmp-import.sql
+  echo "INSERT INTO processes_in_workflows (process_id, workflow_id) VALUES ('$thread', '$WF');" >> tmp-import.sql
   echo "INSERT INTO executes (id, starttime, duration, finalstate, app, scratch) VALUES ('$thread', $time, $duration, '$endstate', '$app', '$scratch');" >> tmp-import.sql
 done < execute.global.event
 
@@ -29,6 +33,7 @@
   operatorid="${WFID}operator:$OPERATORIDCOUNTER"
   echo "INSERT INTO processes (id, type) VALUES ('$operatorid', 'operator');" >> tmp-import.sql
   echo "INSERT INTO invocation_procedure_names (execute_id, procedure_name) VALUES ('$operatorid','$name'); " >> tmp-import.sql
+  echo "INSERT INTO processes_in_workflows (process_id, workflow_id) VALUES ('$operatorid', '$WF');" >> tmp-import.sql
   echo "INSERT INTO dataset_usage (process_id, direction, dataset_id, param_name) VALUES ('$operatorid', 'I', '$lhs', 'lhs');" >> tmp-import.sql
   echo "INSERT INTO dataset_usage (process_id, direction, dataset_id, param_name) VALUES ('$operatorid', 'I', '$rhs', 'rhs');" >> tmp-import.sql
   echo "INSERT INTO dataset_usage (process_id, direction, dataset_id, param_name) VALUES ('$operatorid', 'O', '$result', 'result');" >> tmp-import.sql
@@ -37,6 +42,7 @@
 
 while read id name output; do
   echo "INSERT INTO processes (id, type) VALUES ('$id', 'function');" >> tmp-import.sql
+  echo "INSERT INTO processes_in_workflows (process_id, workflow_id) VALUES ('$id', '$WF');" >> 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




More information about the Swift-commit mailing list