Getting synthetic data out of SDV (the Synthetic Data Vault) is a repeatable six-step loop. The key idea is fit once, sample forever: you train a synthesizer only when your source data meaningfully changes, save that trained model, and then generate as much synthetic data as you need from it — with no retraining. That separation is what makes SDV fit cleanly into production pipelines, where the expensive step (training) runs on a schedule and the cheap step (sampling) runs on demand.
What are the six steps to synthetic data with SDV?
Load your data. Start with plain pandas DataFrames, use the CSVHandler or ExcelHandler for files, or pull directly from a database using the AI Connectors bundle. SDV works on single-table, multi-table, and sequential data — the workflow below is the same shape for all three.
Detect metadata. Metadata is how you describe your data to SDV: the
sdtypeof each column (numerical, categorical, datetime, id, etc.), primary keys, and — for multiple tables — the relationships between them. RunMetadata.detect_from_dataframe(data)(ordetect_from_dataframes(...)for multiple tables) to auto-detect a first pass, review it, fix any misdetected sdtypes withupdate_column(), and save it as JSON to reuse on later runs. Getting metadata right matters: the synthesizer only models what the metadata tells it exists.Fit the synthesizer. This is the main event — training the model on your data with
synthesizer.fit(data). It's the one step you only repeat when the source data meaningfully changes.Save the trained model. Every SDV synthesizer saves to a portable
.pklfile withsynthesizer.save('model.pkl'). The file contains the trained model, not the real data, so you can train in a secure environment and deploy the artifact somewhere else. Reload it anywhere withSynthesizerClass.load('model.pkl').Sample on demand. Load the pre-trained model and call
synthesizer.sample(num_rows=n)to generate whatever volume you need. It's fast, requires no access to the original data, and never needs a refit — so this is the step your pipeline calls repeatedly.Evaluate. Confirm the output before you trust it (see below). This can run on every batch or on a schedule.
Which SDV synthesizer should you pick?
GaussianCopulaSynthesizer — a classical statistical model. Fast, transparent, and customizable; the best default to start with.
CTGANSynthesizer — a GAN-based deep-learning model. Can capture more complex patterns but takes longer to train and is harder to debug.
TVAESynthesizer — a variational-autoencoder model, with speed/quality tradeoffs similar to CTGAN.
CopulaGANSynthesizer — an experimental hybrid of the statistical and GAN approaches.
Start with GaussianCopula, then move to a deep-learning synthesizer only if the Quality Report says you need more. (See all synthesizers →)
Which steps run once vs on demand?
Run once (at pipeline setup): steps 1–4 run on a schedule, whenever the source data refreshes. Training is the costly part, so you gate it behind an actual data change.
Run on demand: steps 5 and 6 run every time you need data. Loading a
.pkland sampling is cheap, so this is the hot path.
How do you check the synthetic output is good?
SDV ships two reports, and they answer different questions:
Diagnostic —
run_diagnostic()checks basic validity and structure: primary keys are unique and non-null, continuous values stay within the real min/max range, and the columns match. You should expect ~100% here for any default synthesizer — a lower score signals a setup problem, not a quality nuance.Quality Report —
evaluate_quality()scores statistical similarity from 0% to 100% across two properties: Column Shapes (how well each column's marginal distribution matches) and Column Pair Trends (how well correlations between column pairs are preserved).
Run the Diagnostic first to confirm the data is valid, then read the Quality Report to see how realistic it is.
Why treat the synthesizer as the artifact?
With SDV, the trained synthesizer is the deliverable. You version it, store it, and deploy it exactly like any other trained ML model.
The training data stays in your secure environment; only the
.pklfile and the synthetic output travel to where they're needed — which is what makes this safe to run across teams and environments.
How are you integrating synthetic data into your workflows?

