> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datachecks.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Translation Agent

> Automatically translate SQL queries, views, and stored procedures from your source database dialect to your target platform.

The Translation agent converts SQL from a source database dialect to a target dialect. You organise translations into projects, each scoped to a source and target data source. The agent translates each query, seeds data into the target, and runs a comparison to verify the result is correct.

## What it does

* Translates SQL queries, views, and stored procedures from source to target dialect
* Verifies translations by running the translated SQL against the target database and comparing results
* Automatically detects and fixes translation errors in a feedback loop
* Generates PySpark scripts as an alternative output for stored procedures

## Create a translation project

A translation project groups related translations under a single source and target data source pair.

1. Navigate to **Translation** in the left sidebar.
2. Click **New Project**.
3. Enter a **Project Name**.
4. Select the **Source Datasource** — the database you are migrating from.
5. Select the **Target Datasource** — the database you are migrating to.
6. Click **Create**.

## Add a translation

Once a project is created, add individual SQL objects to translate.

1. Open the translation project.
2. Click **New Translation**.
3. Select the **Translation Type** — SQL Query, View, or Stored Procedure.
4. Paste or enter the source SQL.
5. For stored procedures, choose the **Output Format**:
   * **Target SQL Script** — Generates the equivalent stored procedure in the target dialect.
   * **PySpark Script** — Generates a PySpark equivalent for platforms such as Databricks.
6. Click **Translate**. The agent runs the translation and verification workflow.

## Supported translation types

| Type                 | Description                                                                                                 |
| -------------------- | ----------------------------------------------------------------------------------------------------------- |
| **SQL Query**        | Translates a SQL SELECT or DML statement to the target dialect.                                             |
| **View**             | Translates a view definition to the target dialect.                                                         |
| **Stored Procedure** | Translates a stored procedure. Choose between a target SQL script or a PySpark script as the output format. |
