Closed luisgomez214 closed 7 months ago
The important line of the error message is
psycopg2.errors.UndefinedColumn: column "url" of relation "users" does not exist
LINE 1: ...NSERT INTO users (id_users,created_at,screen_name,url,listed...
Here, we can see that your python code is inserting into a url
column of the users
table, but the sql schema I provided you does not contain a url
column. I believe when I completed the twitter_postgres
assignment I renamed the column to urls
(with an s
) instead of url
. (In retrospect, I'm not sure why. url
is a better name for the column than urls
because there is only one url being stored in the column. But software projects have a way of building up lots of small inconsistencies like this, and part of being a good engineer is learning how to live with these minor bugs.)
To fix your problem, you could either:
urls
column to be compatible with the schema, orurl
column to be compatible with the python.It won't matter which method you pick.
Hello,
I have made sure to follow the directions regarding bringing down and removing containers/volumes and bringing them back up. I have also made sure my ports match. When I run ' docker-compose exec pg_normalized_batch sh -c 'du -hd0 $PGDATA' ' I get 101 M. When I run 'time docker-compose exec pg_normalized_batch ./run_tests.sh sql.normalized_batch' I fail the test cases. Also, when I run 'sh load_tweets_parallel.sh' I get the output below, so I know there is an issue with my normalized_batch.
Has anyone faced this issue?