SaltMySQLTableInfo¶
Retrieves metadata for a specific MySQL table. It calls the MySQL service to return details like columns, data types, primary keys, and other schema information, and formats the response as human-readable text and JSON.
Usage¶
Use this node when you need to inspect the structure of a MySQL table before building queries, data pipelines, or validations. Provide the target database and table name; the node will query the service for schema details and output a descriptive summary along with the raw JSON payload for downstream processing.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| table_name | True | STRING | The name of the table to retrieve information for. | users |
| database | True | STRING | The MySQL database containing the table. | analytics_db |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | TEXT | A formatted summary of the table metadata, including table name and key structural details. | Table Info: analytics_db.users Columns: id (INT, PK), email (VARCHAR), created_at (DATETIME)... |
| json | JSON | The raw table metadata returned by the service, suitable for parsing and downstream automation. | {"table":"users","database":"analytics_db","columns":[{"name":"id","type":"INT","primary_key":true},{"name":"email","type":"VARCHAR"}]} |
Important Notes¶
- Credentials required: Valid MySQL credentials must be available via the node's credential configuration for the request to succeed.
- Accurate identifiers: Ensure the database and table names are correct and accessible with provided credentials.
- Service-backed: The node communicates with a backend service; network connectivity and service availability can affect results.
- Timeouts: Long-running metadata calls in large schemas may require increasing the timeout.
Troubleshooting¶
- Table not found: Verify the 'database' and 'table_name' values and confirm the user has permissions to read schema metadata.
- Authentication errors: Check that 'credentials_path' points to a valid configuration and that credentials are active.
- Connection/timeout failures: Increase 'timeout', confirm network access to the service, and retry.
- Empty or partial metadata: Ensure the account has sufficient privileges (e.g., SHOW/SELECT metadata permissions) on the target schema.