File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
DataClassification/Services Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 19
19
-->
20
20
## Upcoming Release
21
21
* Fixed parameter description for ` InstanceFailoverGroup ` command.
22
+ * Updated the logic in which schemaName, tableName and columnName are being extracted from the id of SQL Data Classification commands.
22
23
* Fixed Status and StatusMessage fields in ` Get-AzSqlDatabaseImportExportStatus ` to conform to documentation
23
24
24
25
## Version 2.13.0
Original file line number Diff line number Diff line change @@ -285,12 +285,14 @@ private static SensitivityLabel ToSensitivityLabel(SensitivityLabelModel sensiti
285
285
286
286
private static SensitivityLabelModel ToSensitivityLabelModel ( SensitivityLabel sensitivityLabel )
287
287
{
288
- string [ ] idComponents = sensitivityLabel . Id . Split ( '/' ) ;
288
+ var match = new global ::System . Text . RegularExpressions . Regex ( "/schemas/(?<schemaName>.*)/tables/(?<tableName>.*)/columns/(?<columnName>.*)/sensitivityLabels/" ,
289
+ global ::System . Text . RegularExpressions . RegexOptions . IgnoreCase ) . Match ( sensitivityLabel . Id ) ;
290
+
289
291
return new SensitivityLabelModel
290
292
{
291
- SchemaName = idComponents [ 12 ] ,
292
- TableName = idComponents [ 14 ] ,
293
- ColumnName = idComponents [ 16 ] ,
293
+ SchemaName = match . Groups [ "schemaName" ] . Value ,
294
+ TableName = match . Groups [ "tableName" ] . Value ,
295
+ ColumnName = match . Groups [ "columnName" ] . Value ,
294
296
SensitivityLabel = NullifyStringIfEmpty ( sensitivityLabel . LabelName ) ,
295
297
SensitivityLabelId = NullifyStringIfEmpty ( sensitivityLabel . LabelId ) ,
296
298
InformationType = NullifyStringIfEmpty ( sensitivityLabel . InformationType ) ,
You can’t perform that action at this time.
0 commit comments