You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Note:** You must import `dbatools.library` directly, not via the `dbatools` module. The `-ArgumentList` parameter cannot be passed through module dependencies. If you need to use the full `dbatools` module with SqlServer, import `dbatools.library` first with `-ArgumentList $true`, then import `dbatools`.
75
+
73
76
When `-AvoidConflicts` is enabled, dbatools.library will:
74
77
- Check if each assembly is already loaded in the current session
75
-
- Skip loading any assemblies that are already present
78
+
- Skip loading any assemblies that are already present (including Microsoft.Data.SqlClient)
# System.ClientModel 1.1.0+ has the required IPersistableModel interface changes
186
+
if ($clientModelVersion-lt [Version]'1.1.0') {
187
+
$script:hasIncompatibleClientModel=$true
188
+
Write-Verbose"Detected incompatible System.ClientModel version $clientModelVersion - will skip Azure.Core and Azure.Identity to avoid MissingMethodException"
189
+
}
190
+
}
191
+
192
+
# Check if SqlServer's older SqlClient is loaded (which bundles incompatible System.ClientModel)
193
+
# SqlClient 5.x from SqlServer module uses System.ClientModel 1.0.x
Write-Verbose"Detected SqlClient $sqlClientVersion (pre-6.0) which uses incompatible System.ClientModel - will skip Azure.Core and Azure.Identity to avoid MissingMethodException"
203
+
}
204
+
}
205
+
}
206
+
}
207
+
121
208
# Check if SqlClient is already loaded when AvoidConflicts is set
Copy file name to clipboardExpand all lines: project/Dataplat.Dbatools.Csv/CHANGELOG.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [1.1.10] - 2025-12-26
11
+
12
+
### Added
13
+
-**SQL Server schema inference** - New `CsvSchemaInference` class that analyzes CSV data to determine optimal SQL Server column types. Two modes available:
14
+
-`InferSchemaFromSample()` - Fast inference from first N rows (default 1000)
15
+
-`InferSchema()` - Full file scan with progress callback for zero-risk type detection
16
+
-`InferredColumn` class containing column name, SQL data type, max length, nullability, unicode flag, and decimal precision/scale
Copy file name to clipboardExpand all lines: project/Dataplat.Dbatools.Csv/Dataplat.Dbatools.Csv.csproj
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,20 @@
7
7
8
8
<!-- NuGet Package Metadata -->
9
9
<PackageId>Dataplat.Dbatools.Csv</PackageId>
10
-
<Version>1.1.1</Version>
10
+
<Version>1.1.10</Version>
11
11
<Authors>Chrissy LeMaire</Authors>
12
12
<Company>Dataplat</Company>
13
13
<Product>Dataplat.Dbatools.Csv</Product>
14
-
<Description>High-performance CSV reader and writer for .NET. Features streaming IDataReader for SqlBulkCopy, automatic compression (GZip, Deflate, Brotli, ZLib), multi-character delimiters, parallel processing, string interning, and robust error handling. 20%+ faster than LumenWorks CsvReader. From the trusted dbatools project.</Description>
14
+
<Description>High-performance CSV reader with native IDataReader for SqlBulkCopy - 6x faster than legacy solutions for database imports. Database-first design with culture-aware parsing, intelligent null handling, and robust support for messy real-world data (duplicate headers, field mismatches). Features automatic compression (GZip, Deflate, Brotli, ZLib), progress reporting with rows/second metrics, and cancellation support. From the trusted dbatools project.</Description>
<PackageReleaseNotes>Initial release with high-performance CSV parsing, parallel processing support, and comprehensive edge case handling.</PackageReleaseNotes>
23
+
<PackageReleaseNotes>v1.1.10: SQL Server schema inference - auto-detect column types (int, bigint, decimal, datetime2, bit, uniqueidentifier, varchar/nvarchar). v1.1.5: Updated package metadata and URL. v1.1.1: ~25% performance improvement for all-columns reads. v1.1.0: Added CancellationToken and progress reporting support.</PackageReleaseNotes>
0 commit comments