You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mapswipe_workers/tests/readme.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ You can extract the data into csv files like this. Make sure to adjust the where
27
27
where
28
28
project_id = '-NFNr55R_LYJvxP7wmte'
29
29
and group_id in ('g101', 'g102', 'g103', 'g104', 'g105', 'g106', 'g107', 'g108', 'g109' )
30
-
) to 'test_groups.csv' delimiter E'\t' NULL '\N' cs
30
+
) to 'test_groups.csv' delimiter E'\t' NULL '\N' csv
31
31
```
32
32
33
33
```
@@ -36,7 +36,7 @@ You can extract the data into csv files like this. Make sure to adjust the where
36
36
where
37
37
project_id = '-NFNr55R_LYJvxP7wmte'
38
38
and group_id in ('g101', 'g102', 'g103', 'g104', 'g105', 'g106', 'g107', 'g108', 'g109' )
39
-
) to 'test_tasks.csv' delimiter E'\t' csv
39
+
) to 'test_tasks.csv' delimiter E'\t' NULL '\N' csv
40
40
```
41
41
42
42
These 3 tables contain a column in json format. When exporting this into a csv file there is an issue with the quotes, which prevents us from importing the csv file correctly into the test database. Hence you need to adjust the quotes manually in the csv file.
@@ -46,12 +46,14 @@ These 3 tables contain a column in json format. When exporting this into a csv f
46
46
* hit enter, then do the same with the second command: `%s/""/"/g` (it's a search/replace expression, like sed, :%s/thing_to_search/repalcement/g)
47
47
* save with `:w` for (write) and quit with `:q`
48
48
49
+
* for the projects file make sure to check if there is no unwanted line break in the csv file.
50
+
49
51
```
50
52
\copy (
51
53
select * from mapping_sessions ms
52
54
where project_id = '-NFNr55R_LYJvxP7wmte'
53
55
and group_id in ('g101', 'g102', 'g103', 'g104', 'g105', 'g106', 'g107', 'g108', 'g109' )
54
-
) to 'test_mapping_sessions.csv' delimiter E'\t' csv
56
+
) to 'test_mapping_sessions.csv' delimiter E'\t' NULL '\N' csv
55
57
```
56
58
57
59
```
@@ -61,7 +63,7 @@ These 3 tables contain a column in json format. When exporting this into a csv f
61
63
where
62
64
ms.project_id = '-NFNr55R_LYJvxP7wmte'
63
65
and group_id in ('g101', 'g102', 'g103', 'g104', 'g105', 'g106', 'g107', 'g108', 'g109' )
64
-
) to 'test_mapping_sessions_results.csv' delimiter E'\t' csv
66
+
) to 'test_mapping_sessions_results.csv' delimiter E'\t' NULL '\N' csv
0 commit comments