11 lines
165 B
Plaintext
11 lines
165 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
set -euo pipefail
|
||
|
|
||
|
query=${1:?must provide query}
|
||
|
|
||
|
echo "$query"
|
||
|
psql parquet postgres <<EOF
|
||
|
COPY ($query) TO STDOUT WITH (DELIMITER '|', NULL '');
|
||
|
EOF
|