Just want to add that you can also use Notepad++ and the CSV Lint plug-in to just convert a csv file to an insert script. It even automatically including a CREATE TABLE with the correct datatypes for all columns. Yes this makes it slower to import but in the long run it makes working with the data easier.
How to copy from csv file if the file does not contain ID column and the target table has a primary key sequence? Thus, I want id to generated automatically while data from CSV gets copied. Thank you!
hlo sir could you please help me to import csv file I did all same procedure as you all do but my pgsql show 'Process failed' at last every time so please!!!
Check the datatypes like you are assigning int data type to a column but in CSV file if that column contains any float values or text it throws an error Be careful with datatypes it's the pain when using postgresql
Its good but in real world cases its not practically reliable because when the columns has integers, float we can no add them bcz we can't perform sum on string types.
You can always cast a numeric (or any) type on the fly if you want but I think my best advice would be to 1) watch the whole video and 2) put some years under your belt and realize WTF ETL is.
@@TimRubel In the video I'm working on the file locally, but if I needed to get this up to a remote server, say at Digital Ocean, then I would probably secure copy (scp) or use a client like Transmit. The easiest thing, to me, would be to create a local database as I'm doing, then dump the SQL when I'm done and send that to a remote server. What else?
Sure... and pay a grand license fee, investing hours to learn how to push a button instead of some extremely basic syntax to drive a much, much faster tool. But hey - rock your GUI cowperson!
Just want to add that you can also use Notepad++ and the CSV Lint plug-in to just convert a csv file to an insert script. It even automatically including a CREATE TABLE with the correct datatypes for all columns. Yes this makes it slower to import but in the long run it makes working with the data easier.
We can only take the datatypes and create table and later we can import using pgadmin
How to copy from csv file if the file does not contain ID column and the target table has a primary key sequence? Thus, I want id to generated automatically while data from CSV gets copied. Thank you!
hlo sir could you please help me to import csv file
I did all same procedure as you all do but my pgsql show 'Process failed' at last every time so please!!!
I'm getting this same issue. But its happening from every single TH-cam video I've watched 😢😢
Check the datatypes like you are assigning int data type to a column but in CSV file if that column contains any float values or text it throws an error
Be careful with datatypes it's the pain when using postgresql
@@jaideepnalluri okey sir ty.
The copy part has to be 1 line not 3.
copy….from….delimiter
how to solve "invalid byte sequence for encoding "UTF8": 0xdd 0x37"
Its good but in real world cases its not practically reliable because when the columns has integers, float we can no add them bcz we can't perform sum on string types.
You can always cast a numeric (or any) type on the fly if you want but I think my best advice would be to 1) watch the whole video and 2) put some years under your belt and realize WTF ETL is.
how to insert only few columns from csv into table using copy command
CTRL-C/CTRL-V
You skiped a lot of steps for someone trying to connect to a remote database and load a csv
What did I skip?
@@rconery well.... Let's see how did you get the file to the server?
@@TimRubel In the video I'm working on the file locally, but if I needed to get this up to a remote server, say at Digital Ocean, then I would probably secure copy (scp) or use a client like Transmit. The easiest thing, to me, would be to create a local database as I'm doing, then dump the SQL when I'm done and send that to a remote server.
What else?
@@rconery I was using a docker images of pgAdmin4 which is how i stumbled on our video.
Thats not like a pro! That‘s how the first programmers did… Pros do use guis…
Sure... and pay a grand license fee, investing hours to learn how to push a button instead of some extremely basic syntax to drive a much, much faster tool. But hey - rock your GUI cowperson!