Skip to content

Commit

Permalink
Fix order of params
Browse files Browse the repository at this point in the history
  • Loading branch information
stijndcl committed May 6, 2024
1 parent 8c2306e commit 9379ab4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/parallel_index.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Define MySQL connection parameters
# Define PSQL connection parameters
DB_USER="unipept"
DB_PASSWORD="unipept"
DB_HOST="localhost"
Expand Down
11 changes: 6 additions & 5 deletions scripts/parallel_load.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
shopt -s expand_aliases

export db=unipept
export user=unipept
export pass=unipept
export host=localhost
# Define PSQL connection parameters
export DB_USER="unipept"
export DB_PASSWORD="unipept"
export DB_HOST="localhost"
export DB_NAME="unipept"

dir="$1"

Expand All @@ -20,7 +21,7 @@ function load_table() {
else
lz4cat $file
fi
} | PGPASSWORD=$pass psql -U $user -c "COPY $db.$tbl FROM STDIN WITH (FORMAT TEXT, DELIMITER E'\t', HEADER false, NULL '\N');" 2>&1
} | PGPASSWORD=$DB_PASSWORD psql -U $DB_USER -h "$DB_HOST" -c "COPY $DB_NAME.$tbl FROM STDIN WITH (FORMAT TEXT, DELIMITER E'\t', HEADER false, NULL '\N');" 2>&1
}

export -f load_table
Expand Down

0 comments on commit 9379ab4

Please sign in to comment.