-1

i have a star schema datawarehouse i did the load with python and i set the id of the employee = id in the database , ron has id number = 99 , Tom =201 ,Alice =87 but in the database i found the id where set by default . should i add another column id_employee or should i change the id into the real id also i want the fact_table to have the real id Employee table

the code i used to load the database :

for row in pandasSource:
    row["id"]=row["id_employee"]
    dimemployee.ensure(row)
connection.commit()
connection.close
pgconn.close()

enter image description here

Smordy
  • 146
  • 7

1 Answers1

0

Dimensions should have auto-incremented surrogate keys as their primary keys. PKs from source tables should be held as columns in your dimensions

NickW
  • 8,430
  • 2
  • 6
  • 19