Skip to content

feat: add 'join_type' parameter for prejoins in staging#353

Merged
tkiehn merged 4 commits intoScalefreeCOM:mainfrom
lorogno:348-add-staging-join-type
Aug 25, 2025
Merged

feat: add 'join_type' parameter for prejoins in staging#353
tkiehn merged 4 commits intoScalefreeCOM:mainfrom
lorogno:348-add-staging-join-type

Conversation

@lorogno
Copy link
Copy Markdown
Contributor

@lorogno lorogno commented Aug 23, 2025

This Pull Request handles the new feature which is described here: #348
@tkiehn @tkirschke Would be happy if you might take a look into it and tell me your opinion :)

Description

Adds a new Parameter called "join_type" for Prejoining. It allows user to define in specific usecases a Join-Type different than LEFT Join. However, if the parameter is not set, left join is taken as default. Due to that there shouldn't be any issues with backward compatibility.

Examples for now supported Join Types: INNER, LEFT, RIGHT, CROSS, OUTER, FULL

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Tested it on Databricks Environment and checked the compiled Code of existing Staging model in the following usecases:

  • without new Parameter -> Default value works
  • with new Parameter and value INNER -> was successfully compiled as Inner Join
  • staging model with mixed setup, one join with parameter and one without -> was successfully compiled with inner join and left join

Test Configuration:

  • datavault4dbt-Version: 1.9.10
  • dbt-Version: core, 1.10.9
  • dbt-adapter-Version: dbt-databricks, 1.10.10

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation or included information that needs updates (e.g. in the Wiki)

@tkirschke tkirschke requested a review from tkiehn August 25, 2025 05:39
@tkiehn tkiehn added testing To trigger the automated test workflow as internal User. and removed testing To trigger the automated test workflow as internal User. labels Aug 25, 2025
Copy link
Copy Markdown
Collaborator

@tkiehn tkiehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lorogno,

first of all thanks for opening this PR to extend the package!

I've checked and tried it out and it looks good to me.

The only thing I have changed is the default value of the join_type from upper to lower case to match the syntax in the stage-macros :)

Best Regards
Theo

@lorogno
Copy link
Copy Markdown
Contributor Author

lorogno commented Aug 25, 2025

Thanks @tkiehn for the fast review!
Was not sure if i also can contribute to update Documentation for the new Parameter or if you are taking care of that :)

@tkiehn
Copy link
Copy Markdown
Collaborator

tkiehn commented Aug 25, 2025

Was not sure if i also can contribute to update Documentation for the new Parameter or if you are taking care of that :)

Unfortunately currently this is not possible, although we have something planned in this regard :)

So for now, we will take care of updating the documentation

@tkiehn tkiehn linked an issue Aug 25, 2025 that may be closed by this pull request
@tkiehn tkiehn merged commit ddf4820 into ScalefreeCOM:main Aug 25, 2025
@tkiehn tkiehn changed the title add 'join_type' parameter in staging feat: add 'join_type' parameter in staging Aug 25, 2025
@tkiehn tkiehn changed the title feat: add 'join_type' parameter in staging feat: add 'join_type' parameter for prejoins in staging Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Prejoining - Add 'join_type' Parameter (optional)

2 participants