@@ -28,6 +28,7 @@ CLONE_URL_SAMPLE_DATA="https://gitlab.opensourceecology.de/verein/projekte/okh/d
2828CLONE_URL_SPDX_LICENSES=" https://github.com/spdx/license-list-data.git"
2929data_url=" $CLONE_URL_OLD_DATA "
3030data_branch=" main"
31+ debug_loading=false
3132cleanup=false
3233online=true
3334batch_size=" $BATCH_SIZE_DEFAULT "
@@ -44,6 +45,9 @@ function print_help() {
4445 echo " Options:"
4546 echo " -h, --help"
4647 echo " Print this usage help and exit"
48+ echo " --debug-loading"
49+ echo " Instead of a nice progress bar when loading the data into the DB,"
50+ echo " this shows the raw output."
4751 echo " --validate"
4852 echo " Validate the RDF input files before loading them into the DB"
4953 echo " (output: '$validation_output_file ')"
8690 print_help
8791 exit 0
8892 ;;
93+ --debug-loading)
94+ debug_loading=true
95+ ;;
8996 --validate)
9097 validate=true
9198 ;;
@@ -281,14 +288,25 @@ mkdir -p "$db_tmp_dir"
281288
282289echo
283290echo " Loading data into the DB in batches of size $batch_size ..."
284- time while mapfile -t -n " $batch_size " batch && (( ${# batch[@]} ))
285- do
286- " $jena_db_data_injector " \
287- --loc " $db_tmp_dir " \
288- " ${batch[@]} "
289- # --loader=parallel \
290- done < " $input_list_file " 2>&1 \
291- | pv -pet --line-mode --size " $num_inputs " > /dev/null
291+ if $debug_loading
292+ then
293+ time while mapfile -t -n " $batch_size " batch && (( ${# batch[@]} ))
294+ do
295+ " $jena_db_data_injector " \
296+ --loc " $db_tmp_dir " \
297+ " ${batch[@]} "
298+ # --loader=parallel \
299+ done < " $input_list_file "
300+ else
301+ time while mapfile -t -n " $batch_size " batch && (( ${# batch[@]} ))
302+ do
303+ " $jena_db_data_injector " \
304+ --loc " $db_tmp_dir " \
305+ " ${batch[@]} "
306+ # --loader=parallel \
307+ done < " $input_list_file " 2>&1 \
308+ | pv -pet --line-mode --size " $num_inputs " > /dev/null
309+ fi
292310echo
293311if [ -e " $db_dir " ]
294312then
0 commit comments