---
metadata:
  - name: generator
    content: Diplodoc Platform v5.51.0
alternate:
  - https://e2e.viewer-test.ydocs.io/en/yql/udf/python.md
  - https://e2e.viewer-test.ydocs.io/ru/yql/udf/python.md
  - href: https://e2e.viewer-test.ydocs.io/en/yql/udf/python.md
    type: text/markdown
    title: Markdown version
  - href: https://e2e.viewer-test.ydocs.io/en/llms.txt?revision=ytsaurus-test-revision5
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://e2e.viewer-test.ydocs.io/en/llms.txt?revision=ytsaurus-test-revision5

# Instructions for writing Python user-defined functions (UDFs) for YQL


Using a purely declarative, SQL-like approach to describe task results can sometimes be impractical. You may need to specify which data to `JOIN` and how to group it declaratively, while handling the data processing logic imperatively. For these use cases, YQL provides a mechanism for writing and calling user-defined functions (UDFs) in Python.
To learn more about UDFs, see [Python user-defined functions (UDFs) in YQL](https://e2e.viewer-test.ydocs.io/en/user-guide/query-tracker/system-python-udf.md).


