Add shellscripts for processing

main
Joop Kiefte 2 months ago
parent 1260bcacca
commit aa38edcab6

@ -0,0 +1,9 @@
#!/bin/bash
export name=$1
dolt table rm $name
dolt schema import -c --pks id $name $name.csv --dry-run > /tmp/dolt_tmp_query.sql
$EDITOR /tmp/dolt_tmp_query.sql
dolt sql < /tmp/dolt_tmp_query.sql
dolt table import -u $name $name.csv

@ -0,0 +1,6 @@
#!/bin/bash
rm *.txt *.csv
unzip $1
for file in *.txt; do mv $file ${file%.txt}.csv; echo $file; bash import.bash ${file%.txt} ; done
Loading…
Cancel
Save