get_table_schema
Retrieve column names, data types, primary keys, and metadata for any table or view to understand its structure before querying.
Instructions
Get detailed schema information for a specific table or view.
Use this tool when:
User asks "What columns are in CUSTOMER_DATA?"
Need to understand table structure before querying
Planning JOIN operations (need to see key columns)
Checking data types for analysis
What you'll get:
Complete column list with data types
Primary key indicators
Column descriptions
Table metadata (row count, last updated)
Required parameters:
space_id: The space containing the table (uppercase)
table_name: Exact table name (case-sensitive, usually uppercase)
Example queries:
"Show me the schema of CUSTOMER_DATA in SALES_ANALYTICS"
"What columns does SALES_ORDERS have?"
"Describe the GL_ACCOUNTS table structure"
Best practices:
Use search_tables() first if you don't know the exact table name
Check column types before writing queries
Identify key columns for JOINs
Next steps:
Use execute_query() with proper column names and types
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | Yes | The space ID containing the table (e.g., 'SALES_ANALYTICS'). Must be uppercase. | |
| table_name | Yes | Exact table or view name (e.g., 'CUSTOMER_DATA', 'SALES_ORDERS'). Case-sensitive, typically uppercase. |