Commit f3b5d188 authored by Haoyu Z's avatar Haoyu Z
Browse files

version 2.1: add provtuple column to table

parent c4f89093
......@@ -53,6 +53,7 @@ def preprocess_query(query, cur, conn):
output = []
for table in tables:
if table not in tablesWithProvenance:
cmdAddProvtuple = "select 'add_provtuple'({})".format(table)
command1 = "select add_provenance('{}');".format(table)
command2 = "select create_provenance_mapping('{}_provtuple_mapping','{}','provtuple');".format(table, table)
ut.commitAndExecute(conn, cur, command1)
......@@ -113,18 +114,15 @@ def exe_query(query, out_file, cur, conn):
else:
formulas[i].append(tu[0])
print("formulas", formulas)
processed_formulas = []
for fs in formulas:
rowformula = process_formula(fs, tables)
processed_formulas.append(rowformula)
print("processed formula", processed_formulas)
result__ = []
for i, row in enumerate(result_t):
rowl = list(row)
rowl[0] = processed_formulas[i]
result__.append(rowl)
print("result", result__)
# Combine rows with same output
result = ut.combineSameRow(result__)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment