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 type | Common signs | How to analyze |
|---|---|---|
| Detail table | IDs, timestamps, statuses, amounts | Preview first, then aggregate by time and dimension. |
| Dimension table | Smaller row count, names, categories, attributes | Use for joins and label explanation. |
| Aggregate table | Date or metric columns already present | Avoid double-counting or repeated aggregation. |
| Log table | Large volume, many fields, clear time column | Always 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
- Generate a first business query with Generate SQL with AI.
- Run and validate it in SQL Console.
- Build visuals with Build Charts from SQL.