# tfdv.write_schema_text

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/data-validation/blob/v1.16.1/tensorflow_data_validation/utils/schema_util.py#L182-L197) |

Writes input schema to a file in text format.

    tfdv.write_schema_text(
        schema: schema_pb2.Schema, output_path: Text
    ) -> None

### Used in the notebooks

| Used in the tutorials |
|---|
| - [TensorFlow Data Validation](https://www.tensorflow.org/tfx/tutorials/data_validation/tfdv_basic) |

<br />

<br />

<br />

| ## Args ||
|---|---|
| `schema` | A Schema protocol buffer. |
| `output_path` | File path to write the input schema. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | If the input schema is not of the expected type. |

<br />