Skip to content

feat: add joinable-tables and joinable-columns endpoints - #117

Open
fredj wants to merge 1 commit into
georchestra:mainfrom
fredj:joinable-tables-endpoints
Open

feat: add joinable-tables and joinable-columns endpoints#117
fredj wants to merge 1 commit into
georchestra:mainfrom
fredj:joinable-tables-endpoints

Conversation

@fredj

@fredj fredj commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Adds two read-only endpoints for the join-table picker: listing final tables available as join targets, and listing a table's columns. Both apply the same owner/METADATA-rule visibility rule used by the integrity-links list. Extracts that rule into a shared _visibility_condition helper reused by both endpoints.

@fredj
fredj marked this pull request as ready for review August 27, 2026 08:59

@tonio tonio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍🏻

summary="List tables available for join",
description="List tables available for join with role-based filtering. "
"Normal users see only their own links, administrators see all links. "
"No filtering on COPY mode or reference datasets yet.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

«copy mode» ? Reference datasets is for future I guess?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Right — list_joinable_tables currently only returns final tables from regular (non-COPY) imports; COPY-mode and reference-dataset filtering aren't implemented yet, this endpoint just returns everything with a final_table_name for now.

data_session: DataSessionDep,
geo_ctx: GeorchestraContextDep,
group_ids: GroupIdsDep,
) -> list[JoinableTable]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what if there are table with the same names in different schemas ?
Either we should return schema names, or it will be resolved from integrity_link_id ?

@fredj fredj Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Resolution is via integrity_link_id (JoinableTable.id), not table_name, so same-named tables in different schemas don't collide.

Comment thread apps/backend/src/api/routes/ingestion/integrity_links.py Outdated
Adds two read-only endpoints for the join-table picker: listing final
tables available as join targets, and listing a table's columns.
Both apply the same owner/METADATA-rule visibility rule used by the
integrity-links list. Extracts that rule into a shared
visibility_condition helper in core/security.py, reused by both
endpoints.
@fredj
fredj force-pushed the joinable-tables-endpoints branch from 8772862 to e155516 Compare September 8, 2026 14:57
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.

2 participants