DataExpert-io / data-engineer-handbook

This is a repo with links to everything you'd ever want to learn about data engineering
20.25k stars 3k forks source link

README for materials/1-dimensional-data-modeling missed user creation step #129

Open gitgithan opened 3 days ago

gitgithan commented 3 days ago
Run this command after replacing <computer-username> with your computer's username:

psql -U <computer-username> postgres < data.dump

This command failed until I did CREATE ROLE <computer-username> WITH LOGIN SUPERUSER PASSWORD <pass>;

In Dbeaver postgres which uses JDBC, it seems JDBC requires a password too, so using the default postgres which has no password would not connect.

So even if students did not create a new ROLE for <computer-username> and used the default postgres user, they would still fail to connect to dbeaver until a password is added with something like ALTER ROLE postgres WITH PASSWORD 'postgres';

The docker method did not have these complexities because the postgres image required the password and created the required roles as the image started. `

GuendouzeAhcene commented 2 days ago

JDBC، يبدو أن JDBC يتطلب كلمة مرور أيضًا، لذا فإن استخدام postgres الافتراضي الذي لا يحتوي على كلمة مرور لن يؤدي إلى الاتصال.

لذلك حتى لو لم ينشئ الطلاب دورًا جديدًا واستخدموا مستخدم postgres الافتراضي، فسيظلون يفشلون في الاتصال بـ dbeaver حتى تتم إضافة كلمة مرور بشيء مثلALTER ROLE postgres WITH PASSWORD 'postgres';

لم تكن طريقة Docker تحتوي على هذه التعقيدات لأن صورة Postgres تتطلب كلمة المرور وتنشئ الأدوار المطلوبة عند بدء تشغيل الصورة