Loading import_into_DB.sh +5 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ cd $FOLDER echo "Préparation $CSV temporaire..." rm -f $CSV [ -e $CSV ] && rm -v $CSV for f in $SOURCE do echo "Analyse de $f" Loading Loading @@ -77,7 +77,8 @@ echo "Préparation $BDD, table tasks..." # import du csv dans une BD SQLite # et peuplement des colonnes non encore renseignées # par extraction des données depuis le texte des 5 lignes originelles (colonnes ligne1 à ligne5) rm -f $BDD [ -e $BDD ] && rm -v $BDD sqlite3 $BDD << eof .mode csv .separator ; Loading Loading @@ -160,7 +161,7 @@ where ligne3 like '%Exception%' .exit eof rm -f $CSV [ -e $CSV ] && rm -v $CSV echo echo "Generation des slots dans $BDD..." Loading @@ -184,7 +185,7 @@ create table slots (start text, stop text); update slots set stop = time(start, '+1 minutes'); .exit eof rm -f $CSV [ -e $CSV ] && rm -v $CSV echo echo "Génération des tables et vues supplémentaires..." Loading Loading
import_into_DB.sh +5 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ cd $FOLDER echo "Préparation $CSV temporaire..." rm -f $CSV [ -e $CSV ] && rm -v $CSV for f in $SOURCE do echo "Analyse de $f" Loading Loading @@ -77,7 +77,8 @@ echo "Préparation $BDD, table tasks..." # import du csv dans une BD SQLite # et peuplement des colonnes non encore renseignées # par extraction des données depuis le texte des 5 lignes originelles (colonnes ligne1 à ligne5) rm -f $BDD [ -e $BDD ] && rm -v $BDD sqlite3 $BDD << eof .mode csv .separator ; Loading Loading @@ -160,7 +161,7 @@ where ligne3 like '%Exception%' .exit eof rm -f $CSV [ -e $CSV ] && rm -v $CSV echo echo "Generation des slots dans $BDD..." Loading @@ -184,7 +185,7 @@ create table slots (start text, stop text); update slots set stop = time(start, '+1 minutes'); .exit eof rm -f $CSV [ -e $CSV ] && rm -v $CSV echo echo "Génération des tables et vues supplémentaires..." Loading