-
-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke-DbaDbDataGenerator precision to high for datatime datatype #8700
Comments
Thanks for the report! I'll ask @sanderstad to take a look |
The command The following has been changed
@codeunitone Could you clone the dbatools module and switch to the branch |
Thanks for the fast response. I will have a look and let you know |
I tried to load the dbatools module via following command
I get following error message
from where do I get that library? |
Structure of our codebase and contributing steps have changed as we are preparing for the 2.0 release. You will need to install the library now from PowerShell Gallery before you try to import the module from GitHub cloning. The repo of the library does not have a build process that is documented at this time so installing from the PS Gallery is best path. They will have independent releases now. |
I've updated the dev system section on our wiki to include installing the required modules now for local development: |
I created a new branch "fix-datagenerator-new" based on the changes in the branch "fix-datagenerator" from @sanderstad. I will try to test the changes... |
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
I'm trying to insert randomized data into a table with a
datatime
field and getting following errorSteps to Reproduce
Please confirm that you are running the most recent version of dbatools
I'm using following dbatools version: 1.1.143
Other details or mentions
I ran
Invoke-DbaDbDataGenerator
with the-debug
parameter and saw that the datetime string has to many digits for milliseconds. it should be only 3 for the datatypedatetime
The reason for that is, that the
MaskingType
for thedatetime
datatype inside the data generator file isdate
. That is letting theGet-DbaRandomizedValue
creating timestamps with 7 digits for millisecondsWhat PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
Name Value
PSVersion 5.1.19041.1682
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1682
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
SQL Server Edition and Build number
Microsoft SQL Server 2019 (RTM-GDR) (KB5014356) - 15.0.2095.3 (X64) Apr 29 2022 18:00:13 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Enterprise 10.0 (Build 19044: ) (Hypervisor)
.NET Framework Version
.NET Framework 4.8.4515.0
The text was updated successfully, but these errors were encountered: