Skip to content
Generating datasets via the CLI

Generating a Dataset via the CLI

In this guide you will learn how to generate a Fides dataset via the Fides CLI. Read more about datasets here or read how to generate datasets via the Fides Admin UI here.

Generating a dataset from a database

The generate dataset command allows you to quickly create a Fides formatted dataset from a given database to make it easy to identify sensitive data in your systems. For more in-depth details on datasets, check out the Fides Datasets guide.

Example: Generate a Dataset from a database using a connection config file

This example uses connection details stored in the fides.toml to connect to a database and generate a dataset at the location .fides/database.yml.

In this example, pg-credentials is the key that represents the credentials in the configuration file. For more in-depth details on using configuration files, check out the Fides Configuration tutorial.

$ fides generate dataset db \
--credentials-id "pg-credentials" .fides/database.yml
Loaded config from: .fides/fides.toml
Generated dataset manifest written to .fides/database.yml

Generate command in detail

For a detailed guide to using fides generate for creating and managing dataset resources, read the generate CLI guide here.