I am new into databases and PostgreSQL and today I wanted to import this dataset: https://www.kaggle.com/datasets/wilmerarltstrmberg/recipe-dataset-over-2m/data into a PostgreSQL so I can make a recipe finder app.
I started by creating a new database, then creating a table and then creating the exact columns from the dataset:
create table recipes_table (
title text,
ingredients text,
directions text,
link text,
source text,
NER text,
site text
);
Then I proceeded to import all the data from my .csv (by rightclicking on the table and selecting import). I left everything on default and started importing but after 10 seconds I always get errors.
Unfortunately I lost track of every modification I did to my code and table (there were a lot), but I’ll leave the results I had from the processes tab:
enter image description here – first iteration;
I opened my terminal in VS Code and did this to solve it: sed -i ‘s/r//g’ recipes_data.csv
And then I kept getting this error:
enter image description here
Or this similar one:
enter image description here
Now I’m as confused as I can get. How can I import this table in my pgAdmin app so I can visualize it and use it in my project?
And even more, I don’t need every column from this .csv so how can I get for example only the title, ingredients, directions and NER?
Thank you all for your help!