This guide describes the SDGym's metadata specification for a single table of data.

What is metadata?

Metadata is a basic, factual description of a dataset that includes:

  • The type of data that each column represents

  • The primary keys and other identifiers of the table

How does the SDGym library use metadata? Many of the synthesizer use information in the metadata to create higher quality synthetic data. For example, the SDV Synthesizers apply different logic to different column types.

Additionally, the evaluation framework factors in the metadata when applying metrics. For example, some metrics may only be applicable for specific column types.

The SDGym library expects that every dataset will have corresponding metadata provided as a JSON file. During benchmarking, the SDGym reads the file as a Python dictionary.


We assume that the data is present in a CSV format that describes rows and columns of a single table.

Click to see the table's metadata

This is the metadata dictionary for the illustrated table.

    "primary_key": "user_id",
    "columns": {
        "user_id": { "sdtype": "id", "regex": "U_[0-9]{3}" },
        "age": { "sdtype": "numerical" },
        "address": { "sdtype": "street_address" }, 
        "tier": { "sdtype": "categorical" },
        "active": { "sdtype": "boolean"
        "paid_amt": { "sdtype": "numerical" },
        "renew_date": { "sdtype": "datetime", "datetime_format": "%Y-%m-%d" }

Metadata Specification

The metadata has two keys:

  • "primary_key": the column name used to identify a row in the table

  • (required) "columns": a dictionary description of each column

    "primary_key": "user_id",
    "columns": { <column information> }   

Column Information (Fields)

The "columns" key describes each column. It contains the name of the column, followed by the type of data and any other information about it. There are specific data types to choose from.

Boolean columns represent True or False values.

"active" : {
    "sdtype": "boolean"

Properties (None)


Should all the datasets include metadata?

Yes, every dataset available in the SDGym's demo module has an associated metadata file. If you are supplying custom datasets, make sure to write an attach a metadata file too. See Datasets for more information.

Can my custom synthesizer make use of the metadata?

Yes, your custom synthesizer can use any information in the metadata to help create higher quality synthetic data. The metadata information is passed into your synthesizer as a Python dictionary during the training process. See Custom Synthesizers for more information.

Last updated

© Copyright 2023, DataCebo, Inc.