chrthomsen / pygrametl

Official repository for pygrametl - ETL programming in Python
http://pygrametl.org
BSD 2-Clause "Simplified" License
289 stars 41 forks source link

Corrected errors in SlowlyChangingDimension and SnowflakedDimension #38

Closed ssrika17 closed 2 years ago

ssrika17 commented 2 years ago

Error 1: The use of .quotelist instead of .quote in SlowlyChangingDimension resulted in incorrect column names Error 2: The return value of a call to getbyvals in SnowflakedDimension did not include the key value of the root

chrthomsen commented 2 years ago

Does it work to use self.quote instead of self.quotelist on l. 985 if there are 2 or more lookupatts? Don't we have to use something like ', '.join(self.quotelist(self.lookupatts)) (either on l. 980 or the current l. 985)?

ssrika17 commented 2 years ago

I think you are right. The test for multiple lookupatts did pass, but only the default .quote function was used that performs no wrapping at all. When custom quotechars are used to wrap the identifiers, the lookupatts were not quoted correctly.

With the latest corrections the tests pass. Do you agree on these corrections?

chrthomsen commented 2 years ago

Looks good to me