Skip to content

Commit

Permalink
set s3 credentials for duckdb (#151)
Browse files Browse the repository at this point in the history
* set s3 credentials for duckdb

* duckdb init script use eof
  • Loading branch information
ihiverlet authored Oct 31, 2023
1 parent 9d47aa7 commit 484c88e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/onyxia-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@ if [[ "$DARK_MODE" == "true" ]]; then
fi
fi
if [[ -n $AWS_S3_ENDPOINT ]] && command -v duckdb ; then
cat <<EOF > ${HOME}/.duckdbrc
-- Duck head prompt
.prompt '🦆 '
-- Set s3 context
CALL load_aws_credentials();
SET s3_endpoint='$AWS_S3_ENDPOINT';
EOF
fi
if [[ -e "$HOME/work" ]]; then
if [[ $(id -u) = 0 ]]; then
echo "cd $HOME/work" >> /etc/profile
Expand Down

0 comments on commit 484c88e

Please sign in to comment.