Created
June 19, 2018 21:16
-
-
Save Dviejopomata/43c89d177af47132bae87fa349f057ae to your computer and use it in GitHub Desktop.
Copy from postgres with curl and JSON field
This file contains 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
nombre | { "hello":"world1" } | |
---|---|---|
DAVID | {} | |
JOSE | {} |
This file contains 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
Create table prueba_csv ( | |
id UUID default uuid_generate_v4(), | |
nombre varchar(30), | |
data jsonb | |
); | |
COPY prueba_csv(nombre, data) FROM PROGRAM 'curl "http://localhost:8080/prueba.csv"' with (format csv , quote '"', delimiter ','); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment