Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1-dimensional-data-modeling] data loading instructions in README.md are using mismatching command and dump file types #142

Open
gitgithan opened this issue Nov 19, 2024 · 1 comment

Comments

@gitgithan
Copy link

In materials/1-dimensional-data-modeling/README.md

psql \
    -v ON_ERROR_STOP=1 \
    --username $POSTGRES_USER \
    --dbname $POSTGRES_DB \
    < /docker-entrypoint-initdb.d/data.dump>

2 problems.

  1. Extra > at end
  2. data.dump is binary tar, it only works with pg_restore, not psql. It would be unnecessary to teach users to convert binary to plaintext, so suggest removing the psql method completely and only show pg_restore.

For educational purposes, I prefer the dump to be in plaintext sql because it introduces beginners to the psql tool which is used more often than pg_restore, and lets them self-help by reading the setup SQL code without all the conversions between binary and plaintext

@mateusvasconcelos182
Copy link

Nice one!

I had to use

pg_restore
--username $POSTGRES_USER
--dbname $POSTGRES_DB
/docker-entrypoint-initdb.d/data.dump

to works, i didn't knew about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants