Update 'Copy data to postgresql'
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:
|
To change the semicolon separator with comma:
|
||||||
```
|
```
|
||||||
sed --expression='s/;/,/g'
|
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);'
|
||||||
```
|
```
|
Loading…
Reference in a new issue