preview_denormalized_dataset
Preview a wide-table join of related dataset tables. View schema shape, join path, and size estimates, then fetch sample rows from a specific dataset when needed.
Instructions
Preview a denormalized (wide table) view of dataset tables.
Joins related dataset tables into a single wide table. Returns schema shape (columns, join path) and size estimates. Optionally returns actual row data when a dataset and limit are provided.
Modes:
No dataset_rid: Returns schema shape + global size estimates. Use this to explore what a denormalized join would look like.
With dataset_rid, limit=0: Returns shape + dataset-scoped estimates.
With dataset_rid, limit>0: Returns shape + estimates + row preview.
Tables are joined based on their foreign key relationships. Column names are prefixed with the source table name using dots (e.g., "Image.Filename", "Subject.RID"). Intermediate tables needed for the join are auto-discovered.
Args: include_tables: List of table names to include in the join. Tables are joined based on their foreign key relationships. Order doesn't matter - the join order is determined automatically. Add more tables iteratively to expand the denormalized view. dataset_rid: RID of the dataset to preview. If omitted, returns schema shape with global (catalog-wide) row counts. version: Semantic version to query (e.g., "1.0.0"). If not specified, uses the current version. Only used with dataset_rid. limit: Maximum rows to return (default: 0, max: 100). Only used with dataset_rid. Set to 0 for shape and estimates only.
Returns: JSON with columns, join_path, tables (per-table size info), total_rows, total_asset_bytes, total_asset_size. When limit > 0 with a dataset_rid, also includes rows and count.
Example: # Explore schema shape (no dataset needed) preview_denormalized_dataset(["Subject", "Report_HVF"]) -> {"columns": [...], "join_path": ["Report_HVF", "Observation", "Subject"], ...}
# Get dataset-scoped estimates
preview_denormalized_dataset(["Image", "Subject"], dataset_rid="1-ABC")
-> {"columns": [...], "tables": {"Image": {"row_count": 50}}, ...}
# Preview actual rows
preview_denormalized_dataset(["Image", "Subject"], dataset_rid="1-ABC", limit=10)
-> {"columns": [...], "tables": {...}, "rows": [...], "count": 10}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| version | No | ||
| dataset_rid | No | ||
| include_tables | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |