Update 'Copy data to postgresql'

Guillem Borrell Nogueras 2023-01-17 17:46:21 +01:00
parent 56e58b77b9
commit bc6848771d

@ -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);'
```