Datavault-UK / automate-dv

A free to use dbt package for creating and loading Data Vault 2.0 compliant Data Warehouses (powered by dbt, an open source data engineering tool, registered trademark of dbt Labs)
https://www.automate-dv.com
Apache License 2.0
478 stars 114 forks source link

[BUG] PIT table produces wrong ghost values #196

Closed klaus1978 closed 3 weeks ago

klaus1978 commented 1 year ago

Hi *, I am using V. 0.9.5 and built my first PITs with the macro. It seems that the ghost records are not created correctly. As I am using md5 I would assume a Ghost record with 32 '0's, but the query uses e.g. CAST('0000000000000000' AS BINARY(16)))

KR Klaus

AB#5359

DVJocelynShannon commented 1 year ago

Hi KR Klaus,

Thank you for this report, could I ask what platform you are working on?

Thanks, Jossy

DVJocelynShannon commented 1 year ago

Hi,

Have you got ghost records enabled in your project?

The 16 0s is coming from the hard coded ghost record in the PIT macro rather than the ghost records feature, which you are correct should be 32 0s so this will be added to the backlog and updated.

Thank you for raising this!

klaus1978 commented 1 year ago

Hi Shannon, ahh thanks. No I did not enable ghost records. I tested that a few months ago, but this unfortunatelly does not seem to work on our end as we use a lot of weird field names that all would have to be quoted (manually) so I decided to add the ghost record manually. There is a open bug from me regarding that as well:

181

As a workaround I changed now all my ghost record entries to CAST('0000000000000000' AS BINARY(16))) - so this works, but to be honest, I am not sure if this could have a bad influence on the performance as CAST('00000000000000000000000000000000' AS BINARY(32))) would be correct...

Thank you Klaus

DVAlexHiggs commented 3 weeks ago

Fixed and released in v0.11.0, Thank you for your patience on this one!

If the issue persists, please re-open this issue.