Sequential Metadata API
This guide will walk you through creating the metadata using the Python API.
You can optionally include additional metadata related to your sequences. These methods are available on the
Use this function to set the sequence key of your table. Any existing sequence keys will be removed.
The sequence key is a column that identify which row(s) belong to which sequences. This is usually an ID column but it may also be a PII sdtype (such as
This is important for tables that contain multiple sequences. In our example, the sequence key is
'Patient ID'because this column is used to break up the sequences.
If you don't supply a sequence key, the SDV assumes that your table only contains a single sequence. Note: The SDV sequential models do not fully support single sequence data.
column_name: The column name of the sequence key. The column name must already be defined in the metadata and it must be an ID or another PII sdtype.
If you have multiple columns that form a sequence key together,
last_name, you supply them using a tuple.
This will let the SDV know that both columns are needed to uniquely identify a sequence.
Use this function to set the sequence index of your table. Any existing sequence indices will be removed.
The sequence index determines the spacing between the rows in a sequence. Use this if you have an explicit index such as a timestamp. If you don't supply a sequence index, the SDV assumes there is equal spacing of an unknown unit.
column_name: The column name of the sequence index. The column name must already be defined in the metadata. It must be either a numerical or datetime column.