Skip to content

Data load error in movies database with Postgres #12

@FebeFarina

Description

@FebeFarina

This error happens on file sample_databases/sample_db_movies/postgres/09_movie_genres.sql

DROP TABLE IF EXISTS movies.movie_genres;

CREATE TABLE movies.movie_genres (
  movie_id INT DEFAULT NULL,
  genre_id INT DEFAULT NULL,
  CONSTRAINT fk_mg_genre FOREIGN KEY (genre_id) REFERENCES movies.genre (genre_id),
  CONSTRAINT fk_mg_movie FOREIGN KEY (movie_id) REFERENCES movies.movie (movie_id)
);



INSERT INTO movie_genres VALUES
(5,35),
(5,80),
(11,12),
...

The INSERT INTO instruction won't execute because the table name is wrong, as it is not on the public schema. This line should fix this

INSERT INTO movies.movie_genres VALUES

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions