Commit 59df62a
Import-DbaCsv, Export-DbaCsv - Normalize table/schema names via Get-ObjectNameParts
Fixes inconsistency where commands with bracketed table names (e.g. [My.Table])
failed because sys.tables stores bare names without brackets.
- Import-DbaCsv: normalize $table/$schema with Get-ObjectNameParts before using
them in parameterized metadata queries (sys.tables, sys.schemas,
INFORMATION_SCHEMA.COLUMNS). Also handles two-part schema.table input.
- Export-DbaCsv: replace naive dot-split regex with Get-ObjectNameParts so that
names like [Gross.Table.Name] are correctly parsed instead of being split on
the dot inside the brackets.
Closes #9010
(do *Csv*)
Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>1 parent 97d03be commit 59df62a
2 files changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
295 | 301 | | |
296 | 302 | | |
297 | | - | |
| 303 | + | |
298 | 304 | | |
299 | 305 | | |
300 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1022 | 1022 | | |
1023 | 1023 | | |
1024 | 1024 | | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
1025 | 1044 | | |
1026 | 1045 | | |
1027 | 1046 | | |
| |||
0 commit comments