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

[DOCS] Dependent child handling missing from links #228

Open
koillinengit opened this issue Feb 27, 2024 · 5 comments
Open

[DOCS] Dependent child handling missing from links #228

koillinengit opened this issue Feb 27, 2024 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation feature This is is requesting a new feature

Comments

@koillinengit
Copy link

koillinengit commented Feb 27, 2024

Need to do dependent child link and satellite, but it seems to impossible to add link unhashed keys that are not described as hub's.

It should be possible to add for example invoice line numbers in link that has only invoice hub. Line number should be unhashed but should be included to link hashkey. Invoice line satellite should be linked to link and not hub.

I tried to add the line number as hashed key in link, but it seems that it requires always hub.

image

AB#5338

AB#5349

@koillinengit koillinengit added the feature This is is requesting a new feature label Feb 27, 2024
@DVAlexHiggs
Copy link
Member

Hi! Thanks for this request. This should already be supported. A Link's src_fk field can be provided whatever column names you like as long as they are in the staging table your are sourcing from. Can i ask if you're getting any errors or if there's any further information to help us understand the issue please? Thanks

@koillinengit
Copy link
Author

Yes, Alex you are right. The problem for us was that we tried to include the dependent child field directly into link's src_pk beside the src_fk. That was not the correct way of course. It should go into the hashed view and there link's business key list in hashed_columns section. You can close this one.

@koillinengit
Copy link
Author

koillinengit commented Feb 28, 2024

It could be beneficial if in the automateDV documentation would be some word about this dependent child structure handling because it is quite essential feature to get the DataVault model to work together with different source systems.

@phillem15
Copy link

How could we achieve child dependent keys for link sats with the satellite macros? Would we use multi-active satellite? I don't see the src_fk for the sat macro, for example.

@DVAlexHiggs
Copy link
Member

How could we achieve child dependent keys for link sats with the satellite macros? Would we use multi-active satellite? I don't see the src_fk for the sat macro, for example.

Satellite HK must be the same as the parent HK, so you would make the src_pk in the Sat equal to the src_pk in the parent link. You can then join between these to get the keys as needed. Additionally to avoid a join downstream you can use the src_extra_columns parameter to add any additional Link columns (including the fks) as needed. I'd be weary of doing this though.

Keeping this issue open as we want to add a section to the docs on how to represent dependent child relationships and will keep it open until we've got that in the docs. Thanks

@DVAlexHiggs DVAlexHiggs changed the title Dependent child handling missing from links [DOCS] Dependent child handling missing from links May 15, 2024
@DVAlexHiggs DVAlexHiggs added the documentation Improvements or additions to documentation label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature This is is requesting a new feature
Projects
None yet
Development

No branches or pull requests

3 participants