Installs into .claude/skills of the current project.
Are you the author of 323 Dynamic Sql 94831248?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tools-only-323-dynamic-sql-94831248)
# Limitations of Dynamic SQL
## PROBLEM
Some SQL patterns that work in legacy dbt may not be supported by Fusion's static analysis, such as:
```sql
PIVOT(...) FOR column_name IN (ANY)
```
## SOLUTION
The first option is always preferred and should be attempted first, if possible.
### option 1: refactor
refactor away any instances of `PIVOT(...) FOR column_name IN (ANY)` to have hard-coded values.
### option 2: disable static analysis
For models with unsupported dynamic SQL:
1. Add `static_analysis = 'off'` to the model config:
```sql
{{
config(
materialized = 'table',
meta = {
'static_analysis': 'off'
}
)
}}
```
2. Or disable static analysis globally for the model in `dbt_project.yml`