Skip to content

v1.0.1

Latest

Choose a tag to compare

@Empreiteiro Empreiteiro released this 27 Apr 23:56
· 6 commits to main since this release

Data Talks v1.0.1 — SQL relationships onboarding

A small follow-up release: the headline feature is an LLM-driven step
in the SQL source onboarding flow that proposes table relationships
the user can accept or dismiss. Plus a fix for the existing SQL
relationships endpoints that were 500ing, and a build fix so make dev
works after a project relocation.

═══════════════════════════════════════════════════════════════════════
What's new
═══════════════════════════════════════════════════════════════════════

• LLM-suggested SQL table relationships (onboarding step)
When a SQL source is added, the onboarding flow now ends with a
relationships step that asks the configured LLM to propose
foreign-key style joins between the agent's SQL tables — both
cross-source and intra-source. Each suggestion shows
source.table.col ↔ source.table.col with a short rationale
from the model and accept / dismiss buttons. Accepted ones land
in Agent.source_relationships, where they're editable from the
existing Relacionamentos SQL modal. Dismissed ones are
remembered server-side via the existing dismiss endpoint so
they don't reappear on future heuristic runs.

Validated through the same `validate_source_relationships`
pipeline as the heuristic suggester, so a hallucinated table or
column never reaches the user. LLM / parse failures degrade to
an empty list rather than 5xx — the user can skip the step and
add joins manually later.

New endpoint: `POST /sql/agents/{id}/suggest-relationships-llm`.
Schema: both onboarding response shapes gained an optional
`sql_agent_id` field that gates the new step on the frontend.

═══════════════════════════════════════════════════════════════════════
Fixes
═══════════════════════════════════════════════════════════════════════

• SQL relationship endpoints returned 500 with NameError: name 'user' is not defined. The _get_agent_sql_sources helper was
half-migrated from per-user auth to TenantScope: queries used
scope but the signature still declared user: User, and every
call site passed user. Aligned the signature with actual usage
and dropped orphaned imports. Affects /sql/agents/:id/sources,
/relationship-suggestions, /dismiss-relationship-suggestion,
and PUT /relationships.

• make dev and make run failed with Failed to spawn: data-talks when no .venv existed at the project root. The
Makefile now cd backend && before invoking uv run (matching
what make migrate already did), and make install-backend
switched from uv pip install -e ./backend (which required a
pre-existing root venv) to cd backend && uv sync, which
bootstraps backend/.venv automatically.

═══════════════════════════════════════════════════════════════════════
Full changelog
═══════════════════════════════════════════════════════════════════════

v1.0.0...v1.0.1