Most SQL autocomplete tools can tell you which tables and columns exist.

But when you're working with an unfamiliar database, that's often not enough.

You need to know which tables are related, which columns can be joined, and whether there's any evidence supporting those relationships.

That's where conventional SQL autocomplete falls short.

Knowing a Column Exists Isn't the Same as Knowing Its Relationship

Imagine you're building a dbt model that combines orders and customer information.

SELECT o.order_id, o.order_amount FROM {{ ref('stg_orders') }} AS o LEFT JOIN ... 

Your SQL editor can suggest available models. But which model should you join?

Suppose you find two columns:

orders.buyer_ref customers.customer_id 

Different column names. No foreign key constraints. No useful documentation.

A conventional autocomplete tool may recognize both columns without knowing whether they represent the same business entity.

You still need to investigate the relationship yourself.

Using Actual Data to Discover Relationships

One way to investigate a candidate relationship is to examine whether values from one column exist in another.

For example:

SELECT DISTINCT o.buyer_ref FROM orders AS o LEFT JOIN customers AS c ON o.buyer_ref = c.customer_id WHERE o.buyer_ref IS NOT NULL AND c.customer_id IS NULL; 

You might also check whether the candidate customer key contains duplicate values:

SELECT customer_id, COUNT(*) AS row_count FROM customers WHERE customer_id IS NOT NULL GROUP BY customer_id HAVING COUNT(*) > 1; 

These checks provide useful evidence about value inclusion and uniqueness.

They don't prove business correctness, but they help developers evaluate candidate relationships.

Now imagine repeating this investigation across hundreds of tables in an unfamiliar database.

That's the problem we've been working on at Arisyn with IntaLink.

IntaLink analyzes authorized database metadata and column-value evidence to discover candidate relationships, including relationships that aren't explicitly defined through foreign keys.

Developers can explore the discovered relationships, inspect supporting evidence, and review the results.

Bringing Discovered Relationships into dbt Development

Database relationship discovery is useful, but developers shouldn't have to leave their editor every time they need a JOIN condition.

We built IntaLink for dbt, a VS Code extension that brings discovered relationship information directly into the development workflow.

The architecture separates relationship discovery from SQL development:

  • IntaLink Cloud discovers candidate database relationships.
  • Relationships are reviewed and organized into sealed relationship sets.
  • The VS Code extension synchronizes those relationship sets and uses information from the local dbt project.
  • Developers receive relationship-aware suggestions while writing SQL.

When you type JOIN, the extension can suggest related tables and dbt models.

When you type ON, it can suggest eligible JOIN conditions based on the available relationships and SQL aliases.

LEFT JOIN {{ ref('stg_customers') }} AS c ON o.buyer_ref = c.customer_id 

The difference is that the suggestion is backed by discovered relationship information, rather than simply matching column names.

A JOIN Suggestion Should Come with Evidence

One thing we wanted to avoid was turning JOIN completion into another black box.

Developers need to understand why a relationship is being suggested.

IntaLink for dbt can display:

  • Value inclusion rates.
  • Distinct-value statistics.
  • Inferred cardinality.
  • Relationship review status.
  • Existing model usage, where available.

The extension can also flag potential JOIN risks and reuse relationship information across supported dbt model transformations.

These capabilities complement dbt tests and engineering judgment. They don't replace them.

Try Relationship-Aware SQL Completion

We've built an interactive browser-based playground so developers can explore the JOIN suggestion workflow without installing anything or connecting a database.

Try the Interactive Demo

If you'd like to explore the actual extension:

SQL autocomplete has made writing queries easier.

I think the next opportunity is making database relationships available directly within the development workflow.

I'd be interested to hear how other developers currently discover and validate JOIN relationships in unfamiliar databases.