[Yandex Cloud documentation](../../index.md) > [Yandex Query](../index.md) > Step-by-step guides > Uploading a schema

# Uploading a data schema

To streamline the repetitive steps when configuring schemas for [data bindings](../concepts/glossary.md#binding), you can prepare a file with schemas and then upload it. To do this, follow these steps:

1. In the [management console](https://console.yandex.cloud), select the folder containing the data binding you want to update.
1. Navigate to **Yandex Query**.
1. In the left-hand panel, select **Bindings**.
1. Locate the binding you need in the list, click ![ellipsis](../../_assets/console-icons/ellipsis.svg) in its row, and select **Edit**.
1. Click **Upload from file** and select your [schema](#schema) file.
1. Click **Modify**.

## Data schemas {#schema}

We support multiple schema formats:
1. [Plain text](#txt_schema).
1. [JSON](#json_schema).
1. [JSON](#json_schema_data_transfer) compatible with [Data Transfer](../../data-transfer/operations/endpoint/source/data-streams.md#additional-settings).

### Plain text {#txt_schema}

The plain-text schema format is very similar to the SQL DDL syntax: it includes the `SCHEMA` keyword, a list of fields, and their corresponding data types. This is the only export format for data schemas in Yandex Query.

Here is an example of a schema in plain-text format:

```
SCHEMA=(
    billing_account_id String NOT NULL,
    billing_account_name String
    )
```

Where:
* `billing_account_id`: Field name.
* `String`: Field type.
* `NOT NULL`: Flag indicating a required field in the source data.

### JSON {#json_schema}

JSON format is used for importing schemas from external systems. A schema in JSON format is a set of properties defining field names, data types, and required flags.


Here is an example of a schema in JSON format:

```
[
    {
        "name": "billing_account_id",
        "type": "String",
        "required": true
    },
    {
        "name": "billing_account_name",
        "type": "String",
        "required": false
    }
]
```

Where:
* `billing_account_id`: Field name.
* `String`: Field type.
* `required: true`: Flag indicating a required field in the source data.

### Data Transfer-compatible JSON format {#json_schema_data_transfer}

This format is intended for compatible description of data schemas across various systems. This JSON format consists of a set of records defining fields and their types, with all fields considered optional in the source data.

Schema example:

```
[
    {
        "name": "billing_account_id",
        "typeName": "String"
    },
    {
        "name": "billing_account_name",
        "typeName": "String"
    }
]
```

Where:
* `billing_account_id`: Field name.
* `String`: Field type.

To ensure compatibility between Yandex Query and Data Transfer, we recommend using the following data types:
* INT64
* INT32
* INT16
* UINT64
* UINT32
* UINT16
* DOUBLE
* STRING
* UTF8