Dory Docs
Workflows

Explore Unknown Tables with Dory

When you open a new database or schema, do not start with a complex AI-generated query. First inspect table structure, column types, and sample rows. Then ask AI to explain relationships or generate SQL with real context.

When to Use This Workflow

  • You connected a new ClickHouse, PostgreSQL, MySQL, SQLite, or DuckDB database.
  • You are not sure which table contains a metric.
  • Table and column names are unfamiliar.
  • You inherited a dataset from another team.
  • You need to decide whether data is chart-ready.

1. Start in Explorer

Open Explorer and confirm that databases, schemas, tables, and views load correctly.

Look for table names, time columns, status fields, IDs, numeric metrics, comments, partition keys, and sorting keys.

2. Classify the Table

Table typeCommon signsHow to analyze
Detail tableIDs, timestamps, statuses, amountsPreview first, then aggregate by time and dimension.
Dimension tableSmaller row count, names, categories, attributesUse for joins and label explanation.
Aggregate tableDate or metric columns already presentAvoid double-counting or repeated aggregation.
Log tableLarge volume, many fields, clear time columnAlways filter by time and limit rows.

3. Run a Safe Preview Query

SELECT *
FROM your_table
LIMIT 50;

For large tables, add a time filter first.

4. Ask AI to Explain the Structure

Based on the current table schema, explain what business data this table likely contains. Identify time dimensions, measures, and categorical dimensions.

5. Generate Exploration Queries

Ask AI for low-risk exploration queries:

Generate 3 exploration queries for the current table: daily row volume, status distribution, and recent abnormal records. Include a safe time range or LIMIT.

Review the generated SQL before running it.

FAQ

What if AI cannot infer relationships?

Confirm table and column names in Explorer, then provide the likely related tables explicitly.

What if preview queries are slow?

Find the time, partition, or sorting key and narrow the range before querying.

When can I start writing production queries?

Start after you understand the table grain, important columns, time range semantics, and safe filters. Validate assumptions with small preview queries first.

Next Steps

On this page