Thor Logo dbatools

DataGeneration

Get-DbaRandomizedDataset

Sander Stad (@sqlstad, sqlstad.nl)

Get-DbaRandomizedDataset View Source Sander Stad (@sqlstad, sqlstad.nl) Windows, Linux, macOS Synopsis Generates random test data using predefined templates for development and testing scenarios Description Generates random test datasets using JSON templates that define column names and data types. This function creates realistic sample data for database development, testing, and training environments without exposing production data. Templates can specify SQL Server data types (varchar, int, datetime) or semantic data types (Name.

Read more

Get-DbaRandomizedDatasetTemplate

Sander Stad (@sqlstad, sqlstad.nl)

Get-DbaRandomizedDatasetTemplate View Source Sander Stad (@sqlstad, sqlstad.nl) Windows, Linux, macOS Synopsis Retrieves JSON template files that define column structures for generating realistic test data Description Retrieves JSON template files from default and custom directories that define how to generate realistic test datasets. These templates specify column names, data types, and semantic subtypes (like Name.FirstName, Address.City) for creating structured sample data for development and testing environments. The default templates include PersonalData with common fields like names, addresses, and birthdates, and you can specify custom template directories to include organization-specific data patterns.

Read more

Get-DbaRandomizedType

Sander Stad (@sqlstad, sqlstad.nl)

Get-DbaRandomizedType View Source Sander Stad (@sqlstad, sqlstad.nl) Windows, Linux, macOS Synopsis Lists available data types and subtypes for generating realistic test data during database masking operations Description Returns all available randomizer types and subtypes that can be used with Get-DbaRandomizedValue for data masking and test data generation. These types include realistic data patterns like Person names, Address components, Finance data, Internet values, and Random data types. This command helps you discover what fake data options are available when building data masking rules or generating test datasets for non-production environments.

Read more

Get-DbaRandomizedValue

Sander Stad (@sqlstad, sqlstad.nl)

Get-DbaRandomizedValue View Source Sander Stad (@sqlstad, sqlstad.nl) Windows, Linux, macOS Synopsis Generates random data values for SQL Server data types or specialized data patterns for data masking and test data creation Description Creates realistic fake data by generating random values that match SQL Server data type constraints or using specialized data patterns like names, addresses, and phone numbers. This function is essential for data masking in non-production environments, replacing sensitive production data with believable fake data while maintaining referential integrity and data patterns.

Read more

Invoke-DbaDbDataGenerator

Sander Stad (@sqlstad, sqlstad.nl)

Invoke-DbaDbDataGenerator View Source Sander Stad (@sqlstad, sqlstad.nl) Windows, Linux, macOS Synopsis Generates realistic test data for SQL Server database tables using configuration-driven rules Description Populates database tables with randomly generated but realistic test data based on JSON configuration files. Uses the Bogus library to create fake but believable data like names, addresses, phone numbers, and dates that respect column constraints and data types. Perfect for creating development environments, testing scenarios, or demo databases without using production data.

Read more

New-DbaDbDataGeneratorConfig

Sander Stad (@sqlstad, sqlstad.nl)

New-DbaDbDataGeneratorConfig View Source Sander Stad (@sqlstad, sqlstad.nl) Windows, Linux, macOS Synopsis Creates JSON configuration files for generating realistic test data in SQL Server database tables Description Analyzes database table structures and generates JSON configuration files that define how to populate each column with realistic fake data. The function examines column names, data types, constraints, and relationships to intelligently map appropriate data generation rules using the Bogus library. Column names matching common patterns (like “Address”, “Email”, “Phone”) automatically get contextually appropriate fake data types, while other columns get sensible defaults based on their SQL data types.

Read more

Test-DbaDbDataGeneratorConfig

Sander Stad (@sqlstad), sqlstad.nl

Test-DbaDbDataGeneratorConfig View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Validates JSON configuration files used for generating realistic test data in SQL Server databases Description Validates JSON configuration files created by New-DbaDbDataGeneratorConfig before using them with Invoke-DbaDbDataGenerator to populate tables with realistic fake data. The function performs comprehensive validation including checking for required column properties, verifying data types are supported, confirming masking types exist in the Bogus library, and validating subtypes are available.

Read more