From bc6848771db15c2e010b05c6fb738fa7f2f53eb7 Mon Sep 17 00:00:00 2001 From: Guillem Borrell Nogueras Date: Tue, 17 Jan 2023 17:46:21 +0100 Subject: [PATCH] Update 'Copy data to postgresql' --- Copy-data-to-postgresql.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Copy-data-to-postgresql.md b/Copy-data-to-postgresql.md index dd27512..14f5eae 100644 --- a/Copy-data-to-postgresql.md +++ b/Copy-data-to-postgresql.md @@ -37,4 +37,10 @@ tail -n +2 /data/raw/data.csv | iconv -c -f ASCII -t UTF-8 | psql -U postgres -h To change the semicolon separator with comma: ``` sed --expression='s/;/,/g' +``` + +You may also need to alter some columns + +``` +psql -U postgres -h localhost -c 'ALTER TABLE "opportunities" ALTER COLUMN "ProductName" type varchar(1024);' ``` \ No newline at end of file