# YAML tag !include

SnowDDL supports custom `!include` tag in YAML configs. When parser encounters this tag, it loads specified file and uses its contents as value for YAML parameter.

It helps to store SQL or UDF code into separate files instead of putting everything inside YAML, which leads to significant improvement of developer experience by providing syntax highlighting and auto-completion.

It is primarily intended to be used with [VIEW](https://docs.snowddl.com/basic/yaml-configs/view) parameter `text` and [FUNCTION](https://docs.snowddl.com/basic/yaml-configs/function) & [PROCEDURE](https://docs.snowddl.com/basic/yaml-configs/procedure) parameter `body`.

## Example

**my\_view\.yaml** config file:

```yaml
text: !include my_view.sql
```

**my\_view\.sql** file:

```sql
SELECT id, name
FROM my_table
```

## Usage notes

* Include paths are relative to source YAML file. It is possible to "include" from the same directory or from any sub-directory relative to YAML file. Examples of valid paths: `my_view.sql`, `sql/my_view_sql`.
* Loading files from parent directory or using absolute paths are not allowed due to security concerns.
* `!include` can be used with files of any type, including `*.py`, `*.java`, `*.sql`, etc.
* [YAML placeholders](https://docs.snowddl.com/basic/yaml-placeholders) in included files are correctly resolved.
