Created
October 18, 2018 15:48
-
-
Save oniestel/7c64c58f4c69a0c4585ba5255a738c99 to your computer and use it in GitHub Desktop.
Import *.tsv file to dockerized postgres from host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cat <file>.tsv | docker exec -i <container> psql -d <database> -U user -c "COPY <table> FROM STDIN" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment