> For the complete documentation index, see [llms.txt](https://docs.sdv.dev/sdv/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sdv.dev/sdv/modeling/single-table-synthesizers/dayzsynthesizer.md).

# ＊ DayZSynthesizer

{% hint style="info" %}
**＊SDV Enterprise Feature.** This feature is only available for licensed, enterprise users. For more information, visit our page to [Compare SDV Features](/sdv/explore/compare-features.md).
{% endhint %}

The Day Z Synthesizer produces synthetic data from scratch using  the metadata. This allows you start generating synthetic data from **day zero**: no machine learning required!

```python
from sdv.single_table import DayZSynthesizer

synthesizer = DayZSynthesizer(metadata)
synthetic_data = synthesizer.sample(num_rows=10)
```

{% hint style="success" %}
**For the most realistic data**, we recommend making sure that your [metadata](/sdv/integration/metadata.md) is accurate. The DayZ synthesizer will create values and ranges based on the specifications in your metadata. This includes information such as the min/max range of numerical columns and the possible category values in categorical columns.
{% endhint %}

## Creating a synthesizer

When creating your synthesizer, you are required to pass in a [Metadata](/sdv/integration/metadata.md) object as the first argument. We also recommend setting the parameters at this time.

```python
synthesizer = DayZSynthesizer(
    metadata,
    locales=['en_US', 'en_CA', 'fr_CA']
)
```

### Parameter Reference

**`locales`**: A list of locale strings. Any PII columns will correspond to the locales that you provide.

<table data-header-hidden><thead><tr><th width="218"></th><th></th></tr></thead><tbody><tr><td>(default) <code>['en_US']</code></td><td>Generate PII values in English corresponding to US-based concepts (eg. addresses, phone numbers, etc.)</td></tr><tr><td><code>&#x3C;list></code></td><td><p>Create data from the list of locales. Each locale string consists of a 2-character code for the language and 2-character code for the country, separated by an underscore.</p><p></p><p>For example <code>[</code><a href="https://faker.readthedocs.io/en/master/locales/en_US.html"><code>"en_US"</code></a><code>,</code> <a href="https://faker.readthedocs.io/en/master/locales/fr_CA.html"><code>"fr_CA"</code></a><code>]</code>. </p><p>For all options, see the <a href="https://faker.readthedocs.io/en/master/locales.html">Faker docs</a>.</p></td></tr></tbody></table>

### Programmatic Parameters API

For even more realism, use the API below to set some additional parameters.

<details>

<summary><strong><code>set_missing_values</code></strong></summary>

Use this method to set the proportion of missing values to generate in a column

**Parameters**

* (required) `column_name`: A string representing the name of the column. *This column cannot be a primary or foreign key.*
* (required) `missing_values_proportion`: A float representing the proportion of missing values
  * Any float between 0.0 and 1.0: Randomly create this proportion of missing values in the column
* `table_name`: A string representing the name of the table

```python
synthesizer.set_missing_values(
    column_name='room_type',
    missing_values_proportion=0.1
)
```

</details>

## Saving your synthesizer

Save your synthesizer for future use

### save

Use this function to save your synthesizer as a Python pickle file.

**Parameters**

* (required) `filepath`: A string describing the filepath where you want to save your synthesizer. Make sure this ends in `.pkl`&#x20;

**Output** (None) The file will be saved at the desired location

```python
synthesizer.save(
    filepath='my_synthesizer.pkl'
)
```

### load (utility function)

Use this utility function to load a trained synthesizer from a Python pickle file. After loading your synthesizer, you'll be able to sample synthetic data from it.

**Parameters**

* (required) `filepath`: A string describing the filepath of your saved synthesizer

**Output** Your synthesizer object

```python
from sdv.utils import load_synthesizer

synthesizer = load_synthesizer(
    filepath='my_synthesizer.pkl'
)
```

*This utility function works for any SDV synthesizer.*

## What's next?

After training your synthesizer, you can now sample synthetic data. See the [Sampling](/sdv/sampling/sample-realistic-data.md) section for more details.

```python
synthetic_data = synthesizer.sample(num_rows=10)
```

{% hint style="info" %}
**Want to improve your synthesizer?** Input logical rules in the form of [constraints](/sdv/modeling/constraint-augmented-generation-cag.md) and update the transformations used for [preprocessing](/sdv/modeling/configuration/preprocessing.md) the data.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sdv.dev/sdv/modeling/single-table-synthesizers/dayzsynthesizer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
