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 1919-->
2020## Upcoming Release
2121* 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.
2223* Fixed Status and StatusMessage fields in ` Get-AzSqlDatabaseImportExportStatus ` to conform to documentation
2324
2425## Version 2.13.0
Original file line number Diff line number Diff line change @@ -285,12 +285,14 @@ private static SensitivityLabel ToSensitivityLabel(SensitivityLabelModel sensiti
285285
286286 private static SensitivityLabelModel ToSensitivityLabelModel ( SensitivityLabel sensitivityLabel )
287287 {
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+
289291 return new SensitivityLabelModel
290292 {
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 ,
294296 SensitivityLabel = NullifyStringIfEmpty ( sensitivityLabel . LabelName ) ,
295297 SensitivityLabelId = NullifyStringIfEmpty ( sensitivityLabel . LabelId ) ,
296298 InformationType = NullifyStringIfEmpty ( sensitivityLabel . InformationType ) ,
You can’t perform that action at this time.
0 commit comments