[Swift-commit] r3730 - provenancedb
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon Nov 29 17:59:05 CST 2010
Author: lgadelha
Date: 2010-11-29 17:59:05 -0600 (Mon, 29 Nov 2010)
New Revision: 3730
Modified:
provenancedb/prov-to-sql.sh
Log:
Make import scripts work with old and new dataset identifiers
Modified: provenancedb/prov-to-sql.sh
===================================================================
--- provenancedb/prov-to-sql.sh 2010-11-29 23:25:14 UTC (rev 3729)
+++ provenancedb/prov-to-sql.sh 2010-11-29 23:59:05 UTC (rev 3730)
@@ -36,25 +36,25 @@
operatorid="${WFID}operator:$thread"
- echo "INSERT INTO dataset (id) VALUES ('$lhs');" >> tmp-ds.sql
- echo "INSERT INTO dataset (id) VALUES ('$rhs');" >> tmp-ds.sql
- echo "INSERT INTO dataset (id) VALUES ('$result');" >> tmp-ds.sql
+ echo "INSERT INTO dataset (id) VALUES ('$PROVIDPREFIX$lhs');" >> tmp-ds.sql
+ echo "INSERT INTO dataset (id) VALUES ('$PROVIDPREFIX$rhs');" >> tmp-ds.sql
+ echo "INSERT INTO dataset (id) VALUES ('$PROVIDPREFIX$result');" >> tmp-ds.sql
echo "INSERT INTO process (id, type, name, workflow_id) VALUES ('$operatorid', 'operator', '$name', '$WF');" >> tmp-p.sql
- echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$operatorid', 'I', '$lhs', 'lhs');" >> tmp-dsu.sql
- echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$operatorid', 'I', '$rhs', 'rhs');" >> tmp-dsu.sql
- echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$operatorid', 'O', '$result', 'result');" >> tmp-dsu.sql
+ echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$operatorid', 'I', '$PROVIDPREFIX$lhs', 'lhs');" >> tmp-dsu.sql
+ echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$operatorid', 'I', '$PROVIDPREFIX$rhs', 'rhs');" >> tmp-dsu.sql
+ echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$operatorid', 'O', '$PROVIDPREFIX$result', 'result');" >> tmp-dsu.sql
done < operators.txt
while read id name output; do
- echo "INSERT INTO dataset (id) VALUES ('$output');" >> tmp-ds.sql
+ echo "INSERT INTO dataset (id) VALUES ('$PROVIDPREFIX$output');" >> tmp-ds.sql
echo "INSERT INTO process (id, type, name, workflow_id) VALUES ('$id', 'function', '$name', '$WF');" >> tmp-p.sql
- echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$id', 'O', '$output', 'result');" >> tmp-dsu.sql
+ echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$id', 'O', '$PROVIDPREFIX$output', 'result');" >> tmp-dsu.sql
done < functions.txt
while read id value; do
# TODO need ordering/naming
- echo "INSERT INTO dataset (id) VALUES ('$value');" >> tmp-ds.sql
- echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$id', 'I', '$value', 'undefined');" >> tmp-dsu.sql
+ echo "INSERT INTO dataset (id) VALUES ('$PROVIDPREFIX$value');" >> tmp-ds.sql
+ echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$id', 'I', '$PROVIDPREFIX$value', 'undefined');" >> tmp-dsu.sql
done < function-inputs.txt
@@ -63,19 +63,19 @@
done < invocation-procedure-names.txt
while read outer inner; do
- echo "INSERT INTO dataset (id) VALUES ('$outer');" >> tmp-ds.sql
- echo "INSERT INTO dataset (id) VALUES ('$inner');" >> tmp-ds.sql
- echo "INSERT INTO ds_containment (out_id, in_id) VALUES ('$outer', '$inner');" >> tmp-dsc.sql
+ echo "INSERT INTO dataset (id) VALUES ('$PROVIDPREFIX$outer');" >> tmp-ds.sql
+ echo "INSERT INTO dataset (id) VALUES ('$PROVIDPREFIX$inner');" >> tmp-ds.sql
+ echo "INSERT INTO ds_containment (out_id, in_id) VALUES ('$PROVIDPREFIX$outer', '$PROVIDPREFIX$inner');" >> tmp-dsc.sql
done < tie-containers.txt
while read dataset filename; do
- echo "INSERT INTO dataset (id) VALUES ('$dataset');" >> tmp-ds.sql
- echo "INSERT INTO file (id, filename) VALUES ('$dataset', '$filename');" >> tmp-f.sql
+ echo "INSERT INTO dataset (id) VALUES ('$PROVIDPREFIX$dataset');" >> tmp-ds.sql
+ echo "INSERT INTO file (id, filename) VALUES ('$PROVIDPREFIX$dataset', '$filename');" >> tmp-f.sql
done < dataset-filenames.txt
while read dataset value; do
- echo "INSERT INTO dataset (id) VALUES ('$dataset');" >> tmp-ds.sql
- echo "INSERT INTO variable (id, value) VALUES ('$dataset', '$value');" >> tmp-v.sql
+ echo "INSERT INTO dataset (id) VALUES ('$PROVIDPREFIX$dataset');" >> tmp-ds.sql
+ echo "INSERT INTO variable (id, value) VALUES ('$PROVIDPREFIX$dataset', '$value');" >> tmp-v.sql
done < dataset-values.txt
while read start duration wfid rest; do
@@ -110,8 +110,8 @@
else
dir=O
fi
- echo "INSERT INTO dataset (id) VALUES ('$dataset');" >> tmp-ds.sql
- echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$thread', '$dir', '$dataset', '$variable');" >> tmp-dsu.sql
+ echo "INSERT INTO dataset (id) VALUES ('$PROVIDPREFIX$dataset');" >> tmp-ds.sql
+ echo "INSERT INTO ds_usage (process_id, direction, dataset_id, param_name) VALUES ('$thread', '$dir', '$PROVIDPREFIX$dataset', '$variable');" >> tmp-dsu.sql
done < tie-data-invocs.txt
while read id ; do
More information about the Swift-commit
mailing list