I need to import a CSV file into Postgres (version 9.6.3) and I need help in understanding the best way to do this.
The formatting of the CSV is as is shown below and as well as understanding the best way to actually import the file, I am also unsure of the datatype I should use in the table for storing the 'time' field as it contains milliseconds and is formatted as 'YYYY.MM.DD HH:MM:SS.MS'
Time,Col1,Col2,Col3,Col4
2017.05.01 00:00:02.851,1.09062,1.09057,4.35,5.42
2017.05.01 00:00:03.368,1.09062,1.09058,3.22,1
...
I have the pgadmin client so could use that but I am also open to using raw SQL from the command line or using Python (Python 3.6) to create the table and import the data.
The files I would like to import range in size from 20mbs to hundreds of mbs in size so I would like to find the quickest method of doing this.