Danger You are looking at the documentation for an older version of the SDV! We are no longer supporting or maintaining this version of the software Click here to go to the new docs pages.
Danger
You are looking at the documentation for an older version of the SDV! We are no longer supporting or maintaining this version of the software
Click here to go to the new docs pages.
Metadata([metadata, root_path])
Metadata
Dataset Metadata.
Metadata.add_field(table, field, field_type)
Metadata.add_field
Add a new field to the indicated table.
Metadata.add_relationship(parent, child[, …])
Metadata.add_relationship
Add a new relationship between the parent and child tables.
Metadata.add_table(name[, data, fields, …])
Metadata.add_table
Add a new table to this metadata.
Metadata.set_primary_key(table, field)
Metadata.set_primary_key
Set the primary key field of the indicated table.
Metadata.validate([tables])
Metadata.validate
Validate this metadata.
Metadata.visualize([path, names, details])
Metadata.visualize
Plot metadata usign graphviz.
Metadata.to_dict()
Metadata.to_dict
Get a dict representation of this metadata.
Metadata.to_json(path)
Metadata.to_json
Dump this metadata into a JSON file.
Metadata.get_children(table_name)
Metadata.get_children
Get tables for which the given table is parent.
Metadata.get_dtypes(table_name[, ids, errors])
Metadata.get_dtypes
Get a dict with the dtypes for each field of a given table.
dict
dtypes
Metadata.get_field_meta(table_name, field_name)
Metadata.get_field_meta
Get the metadata dict for a table.
Metadata.get_fields(table_name)
Metadata.get_fields
Get the metadata of the fields of the indicated table.
Metadata.get_foreign_keys(parent, child)
Metadata.get_foreign_keys
Get the name of all the fields in the child that are foreign keys to this parent.
Metadata.get_parents(table_name)
Metadata.get_parents
Get tables for with the given table is child.
Metadata.get_primary_key(table_name)
Metadata.get_primary_key
Get the name of the primary key of the indicated table, if it has one.
Metadata.get_table_meta(table_name)
Metadata.get_table_meta
Metadata.get_tables()
Metadata.get_tables
Get the list with the tables found in this metadata.
Metadata.load_table(table_name)
Metadata.load_table
Load the data of the indicated table as a DataFrame.
Metadata.load_tables([tables])
Metadata.load_tables
Get a dictionary with data from multiple tables.