Skip to content

info note on junction table joins [DOC-1090] #7567

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

Merged
merged 3 commits into from
Apr 16, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/unify/data-graph/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,12 @@ For many:many relationships, define the join on between the two entity tables wi

**Junction table spec**

| Parameters | Definition |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
> info ""
> When used in junctions tables, `left join` is the column on the junction table to link with the parent (left) entity and `right join` is the column on the junction table to join with the child (right) entity. These values don’t actually manipulate the type of join - they are currently always `INNER JOINS`.
Copy link
Contributor

Choose a reason for hiding this comment

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

@stayseesong I don't think this is super clear. Gonna drop an alternative suggestion in the original ticket.



| Parameters |Definition |
| --------------- | --------------------------------- |
| `table_ref` | Defines the fully qualified table reference to the join table: `[database name].[schema name].[table name]`. Segment flexibly supports tables, views and materialized views |
| `primary_key` | The unique identifier for the given table. Must be a column with unique values per row |
| `left_join_on` | Define the relationship between the left entity table and the junction table: `[left entity slug].[column name] = [junction table column name]`. Note that schema and table are implied within the junction table column name, so you do not need to define it again |
Expand Down