fix_sql
Corrects SQL syntax and style issues in a SQL string based on a specified dialect, returning the fixed SQL text.
Instructions
Fix a raw SQL string using an explicitly specified dialect and return the fixed SQL text (does not touch any file).
Args: sql: The SQL text to fix. dialect: SQLFluff dialect name, e.g. "ansi", "bigquery", "snowflake", "postgres". rules: Optional list of rule codes/names to restrict fixing to.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| rules | No | ||
| dialect | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||