sqlite-utils insert --sniff option, closes #230

This commit is contained in:
Simon Willison 2021-02-14 11:23:12 -08:00
commit 99ff0a288c
7 changed files with 74 additions and 9 deletions

5
tests/sniff/example1.csv Normal file
View file

@ -0,0 +1,5 @@
id,species,name,age
1,dog,Cleo,5
2,dog,Pancakes,4
3,cat,Mozie,8
4,spider,"Daisy, the tarantula",6
1 id species name age
2 1 dog Cleo 5
3 2 dog Pancakes 4
4 3 cat Mozie 8
5 4 spider Daisy, the tarantula 6

5
tests/sniff/example2.csv Normal file
View file

@ -0,0 +1,5 @@
id;species;name;age
1;dog;Cleo;5
2;dog;Pancakes;4
3;cat;Mozie;8
4;spider;"Daisy, the tarantula";6
1 id species name age
2 1 dog Cleo 5
3 2 dog Pancakes 4
4 3 cat Mozie 8
5 4 spider Daisy, the tarantula 6

5
tests/sniff/example3.csv Normal file
View file

@ -0,0 +1,5 @@
id,species,name,age
1,dog,Cleo,5
2,dog,Pancakes,4
3,cat,Mozie,8
4,spider,'Daisy, the tarantula',6
1 id,species,name,age
2 1,dog,Cleo,5
3 2,dog,Pancakes,4
4 3,cat,Mozie,8
5 4,spider,'Daisy, the tarantula',6

5
tests/sniff/example4.csv Normal file
View file

@ -0,0 +1,5 @@
id species name age
1 dog Cleo 5
2 dog Pancakes 4
3 cat Mozie 8
4 spider 'Daisy, the tarantula' 6
1 id species name age
2 1 dog Cleo 5
3 2 dog Pancakes 4
4 3 cat Mozie 8
5 4 spider 'Daisy, the tarantula' 6