Author | Sander Stad (@sqlstad, sqlstad.nl) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Get-DbaRandomizedDataset on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaRandomizedDataset.
This function will generate a random data set based on a template
Generates a random value based on a template.
The templates standardized in the templates folder and can be used to generate a data set.
There is also an option to point to a specific template
Get-DbaRandomizedDataset
[[-Template] <String[]>]
[[-TemplateFile] <String[]>]
[[-Rows] <Int32>]
[[-Locale] <String>]
[[-InputObject] <Object[]>]
[-EnableException]
[<CommonParameters>]
PS C:\> Get-DbaRandomizedDataset -Template Personaldata
Generate a data set based on the default template PersonalData.
PS C:\> Get-DbaRandomizedDataset -Template Personaldata -Rows 10
Generate a data set based on the default template PersonalData with 10 rows
PS C:\> Get-DbaRandomizedDataset -TemplateFile C:\Dataset\FinancialData.json
Generates data set based on a template file in another directory
PS C:\> Get-DbaRandomizedDataset -Template Personaldata, FinancialData
Generates multiple data sets
PS C:\> Get-DbaRandomizedDatasetTemplate -Template PersonalData | Get-DbaRandomizedDataset
Pipe the templates from Get-DbaRandomizedDatasetTemplate to Get-DbaRandomizedDataset and generate the data set
The name of the template to use.
It will go through the default templates to see if it's present
Alias | |
Required | False |
Pipeline | false |
Default Value |
File to use as a template
Alias | |
Required | False |
Pipeline | false |
Default Value |
Amount of rows to generate. Th default is 100.
Alias | |
Required | False |
Pipeline | false |
Default Value | 100 |
Set the local to enable certain settings in the masking. The default is 'en'
Alias | |
Required | False |
Pipeline | false |
Default Value | en |
Accepts piped input from Get-DbaRandomizedDatasetTemplate
Alias | |
Required | False |
Pipeline | true (ByValue) |
Default Value |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |