# HG changeset patch # User jjohnson # Date 1500068062 14400 # Node ID 357fe86f245d6bd7f7c7edd471c3cb84edaa0a77 # Parent ab27c4bd14b9f48d327c1fcf9cde60a6e89f1248 Uploaded diff -r ab27c4bd14b9 -r 357fe86f245d filter_tabular.xml --- a/filter_tabular.xml Fri Jul 14 11:39:27 2017 -0400 +++ b/filter_tabular.xml Fri Jul 14 17:34:22 2017 -0400 @@ -1,4 +1,4 @@ - + @@ -7,11 +7,8 @@ - - - - - - + + + + + - + + + - - + + + + - - - - + + + + + + - - + + + + - + + + + + + + + + + - - + + + + - - - + + + + + + + + + + + + diff -r ab27c4bd14b9 -r 357fe86f245d query_db.py --- a/query_db.py Fri Jul 14 11:39:27 2017 -0400 +++ b/query_db.py Fri Jul 14 17:34:22 2017 -0400 @@ -28,7 +28,7 @@ return re.sub(expr, replace, item) -def get_connection(sqlitedb_path, addfunctions=False): +def get_connection(sqlitedb_path, addfunctions=True): conn = sqlite.connect(sqlitedb_path) if addfunctions: conn.create_function("re_match", 2, regex_match) diff -r ab27c4bd14b9 -r 357fe86f245d query_tabular.xml --- a/query_tabular.xml Fri Jul 14 11:39:27 2017 -0400 +++ b/query_tabular.xml Fri Jul 14 17:34:22 2017 -0400 @@ -1,4 +1,4 @@ - + using sqlite sql @@ -7,29 +7,27 @@ - - - - @@ -145,17 +143,36 @@ - - - +
+ + + + + + +
+
+ + +
- - +
+ + + + + + +
+
+ + +
@@ -164,10 +181,28 @@ - +
+ + + + + + +
+
+ +
+
+ + + + + + +
@@ -176,7 +211,17 @@ - +
+ + + + + + +
+
+ +
@@ -185,62 +230,162 @@ - - +
+ + + + + + +
+
+ + +
- - +
+ + + + + + +
+
+ + +
- +
+
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+ + +
+ + - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
- - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
diff -r ab27c4bd14b9 -r 357fe86f245d sqlite_to_tabular.xml --- a/sqlite_to_tabular.xml Fri Jul 14 11:39:27 2017 -0400 +++ b/sqlite_to_tabular.xml Fri Jul 14 17:34:22 2017 -0400 @@ -1,20 +1,17 @@ - + for SQL query macros.xml - - - - diff -r ab27c4bd14b9 -r 357fe86f245d test-data/._add_to_db_results.tsv Binary file test-data/._add_to_db_results.tsv has changed diff -r ab27c4bd14b9 -r 357fe86f245d test-data/._filtered_people_results.tsv Binary file test-data/._filtered_people_results.tsv has changed diff -r ab27c4bd14b9 -r 357fe86f245d test-data/._filtered_pets_results.tsv Binary file test-data/._filtered_pets_results.tsv has changed diff -r ab27c4bd14b9 -r 357fe86f245d test-data/._query_results.tsv Binary file test-data/._query_results.tsv has changed diff -r ab27c4bd14b9 -r 357fe86f245d test-data/add_to_db_results.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/add_to_db_results.tsv Fri Jul 14 17:34:22 2017 -0400 @@ -0,0 +1,3 @@ +#id first last pets quote +1 Paula Brown 2 Time flies like and arrow. Fruit flies like a banana. +2 Steven Jones 1 I would have wrtten less if I had more time diff -r ab27c4bd14b9 -r 357fe86f245d test-data/filtered_people_results.tsv --- a/test-data/filtered_people_results.tsv Fri Jul 14 11:39:27 2017 -0400 +++ b/test-data/filtered_people_results.tsv Fri Jul 14 17:34:22 2017 -0400 @@ -1,5 +1,4 @@ -1 FirstName LastName DOB Pets -2 Paula Brown 1978-05-24 2 -3 Steven Jones 1974-04-04 1 -4 Jane Doe 1978-05-24 0 -5 James Smith 1980-10-20 1 +1 Paula Brown 1978-05-24 2 +2 Steven Jones 1974-04-04 1 +3 Jane Doe 1978-05-24 0 +4 James Smith 1980-10-20 1 diff -r ab27c4bd14b9 -r 357fe86f245d test-data/filtered_pets_results.tsv --- a/test-data/filtered_pets_results.tsv Fri Jul 14 11:39:27 2017 -0400 +++ b/test-data/filtered_pets_results.tsv Fri Jul 14 17:34:22 2017 -0400 @@ -1,6 +1,4 @@ -1 PetNames PetType -2 Rex dog -2 Fluff cat -3 Allie cat -4 -5 Spot +1 Rex dog +1 Fluff cat +2 Allie cat +4 Spot diff -r ab27c4bd14b9 -r 357fe86f245d test-data/pet_normalized_query_results.tsv --- a/test-data/pet_normalized_query_results.tsv Fri Jul 14 11:39:27 2017 -0400 +++ b/test-data/pet_normalized_query_results.tsv Fri Jul 14 17:34:22 2017 -0400 @@ -1,3 +1,3 @@ #id first last dob name animal pets -2 Paula Brown 1978-05-24 Fluff cat 2 -3 Steven Jones 1974-04-04 Allie cat 1 +1 Paula Brown 1978-05-24 Fluff cat 2 +2 Steven Jones 1974-04-04 Allie cat 1 diff -r ab27c4bd14b9 -r 357fe86f245d test-data/query_results.tsv --- a/test-data/query_results.tsv Fri Jul 14 11:39:27 2017 -0400 +++ b/test-data/query_results.tsv Fri Jul 14 17:34:22 2017 -0400 @@ -5,13 +5,13 @@ ADAMTSL1 SLDMCISGL 1 9 30.5 0.698 26 SB PPAP2C FGMYCMVFL 2 10 2.3 0.501 222 WB PPAP2C FGMYCMVFL 2 10 6.55 0.501 222 WB -ADAMTSL1 MCISGLCQL 4 12 6.65 0.306 1823 None -ADAMTSL1 MCISGLCQL 4 12 14.0 0.306 1823 None -PPAP2C MYCMVFLVK 4 12 0.65 0.07 23399 None -PPAP2C MYCMVFLVK 4 12 54.0 0.07 23399 None -ADAMTSL1 LDMCISGLC 2 10 42.0 0.069 23677 None -ADAMTSL1 LDMCISGLC 2 10 76.0 0.069 23677 None -PPAP2C SFGMYCMVF 1 9 0.5 0.066 24390 None -PPAP2C SFGMYCMVF 1 9 45.0 0.066 24390 None -ADAMTSL1 DMCISGLCQ 3 11 64.5 0.042 31630 None -ADAMTSL1 DMCISGLCQ 3 11 97.0 0.042 31630 None +ADAMTSL1 MCISGLCQL 4 12 6.65 0.306 1823 +ADAMTSL1 MCISGLCQL 4 12 14.0 0.306 1823 +PPAP2C MYCMVFLVK 4 12 0.65 0.07 23399 +PPAP2C MYCMVFLVK 4 12 54.0 0.07 23399 +ADAMTSL1 LDMCISGLC 2 10 42.0 0.069 23677 +ADAMTSL1 LDMCISGLC 2 10 76.0 0.069 23677 +PPAP2C SFGMYCMVF 1 9 0.5 0.066 24390 +PPAP2C SFGMYCMVF 1 9 45.0 0.066 24390 +ADAMTSL1 DMCISGLCQ 3 11 64.5 0.042 31630 +ADAMTSL1 DMCISGLCQ 3 11 97.0 0.042 31630 diff -r ab27c4bd14b9 -r 357fe86f245d test-data/testdb.sqlite Binary file test-data/testdb.sqlite has changed