sdv.metadata.dataset

Metadata Creation

Metadata([metadata, root_path])

Dataset Metadata.

Metadata.add_field(table, field, field_type)

Add a new field to the indicated table.

Metadata.add_relationship(parent, child[, …])

Add a new relationship between the parent and child tables.

Metadata.add_table(name[, data, fields, …])

Add a new table to this metadata.

Metadata.set_primary_key(table, field)

Set the primary key field of the indicated table.

Metadata.validate([tables])

Validate this metadata.

Metadata.visualize([path, names, details])

Plot metadata usign graphviz.

Metadata.to_dict()

Get a dict representation of this metadata.

Metadata.to_json(path)

Dump this metadata into a JSON file.

Metadata Navigation

Metadata.get_children(table_name)

Get tables for which the given table is parent.

Metadata.get_dtypes(table_name[, ids, errors])

Get a dict with the dtypes for each field of a given table.

Metadata.get_field_meta(table_name, field_name)

Get the metadata dict for a table.

Metadata.get_fields(table_name)

Get the metadata of the fields of the indicated table.

Metadata.get_foreign_keys(parent, child)

Get the name of all the fields in the child that are foreign keys to this parent.

Metadata.get_parents(table_name)

Get tables for with the given table is child.

Metadata.get_primary_key(table_name)

Get the name of the primary key of the indicated table, if it has one.

Metadata.get_table_meta(table_name)

Get the metadata dict for a table.

Metadata.get_tables()

Get the list with the tables found in this metadata.

Metadata Usage

Metadata.transform(table_name, data)

Transform data for a given table.

Metadata.reverse_transform(table_name, data)

Reverse the transformed data for a given table.

Metadata.load_table(table_name)

Load the data of the indicated table as a DataFrame.

Metadata.load_tables([tables])

Get a dictionary with data from multiple tables.