Profile a warehouse schema
profile_schemaProfiles a warehouse schema into a minimal Apache Ossie semantic model by inferring keys, time fields, table kinds, and relationships with evidence and confidence, then outputs YAML and open questions.
Instructions
Profile a warehouse schema into a minimal Apache Ossie semantic model, the first step towards a GASP mapping (readiness level 1). Pass the schema as the rows of information_schema.columns (JSON or CSV with table, column and type), an object with a tables list, or CREATE TABLE statements, read through your own warehouse MCP or from a dump. Optionally pass statistics per column (rows, nulls, distinct, min, max, values); output: statistics returns the query that gathers them. For every table the profile infers the key, the time field and the kind (snapshot, event, fact or reference), each with its evidence and confidence, plus the relationships the columns imply; a low-confidence inference is left out of the model and listed as a question for the Decide step rather than guessed. The report ends with the model as YAML, to pass to propose_mapping as semantic_model; the questions go to record_decision.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schema": "<schema>"
},
"name": "profile_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | No | 'report' (default): the profile with evidence, questions and the model as YAML; 'model': the YAML alone; 'json': the profile and the model as data; 'statistics': the SQL that gathers the statistics for this schema. | |
| schema | Yes | The schema: information_schema.columns rows as JSON (array of objects with table_name, column_name, data_type, optionally table_schema and is_nullable) or CSV with those headers; or { tables: [{ name, schema?, columns: [{ name, type }] }] }; or CREATE TABLE statements (PRIMARY KEY and REFERENCES clauses are read). | |
| dialect | No | With output: statistics, the warehouse the query is written for (the string type of its min and max columns); postgres by default. | |
| statistics | No | Per-column statistics as JSON rows or CSV: table, column, rows (or row_count), nulls (or null_count or null_rate), distinct (or distinct_count), min, max, values (a JSON array or a | separated list for a short list of values). Optional; the profile says what they would settle. | |
| organization | No | The company's name, used in the model's name. |