From 97f95aa3e0b58d8cc70a76f2aa226e78d82d09ce Mon Sep 17 00:00:00 2001 From: Christian Wade Date: Fri, 30 Apr 2021 19:49:31 -0700 Subject: [PATCH] lineageTag option --- BismNormalizer/AlmToolkit/Program.cs | 3 + .../AlmToolkit/Properties/AssemblyInfo.cs | 4 +- .../AlmToolkitSetup/AlmToolkitSetup.vdproj | 20 ++-- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../BismNormalizer.IconSetup.exe | Bin 10240 -> 10240 bytes .../BismNormalizer/BismNormalizer.exe | Bin 16384 -> 16384 bytes .../BismNormalizer/Properties/AssemblyInfo.cs | 4 +- .../BismNormalizer/Settings.Designer.cs | 14 ++- .../BismNormalizer/Settings.settings | 3 + .../TabularCompare/OptionsInfo.cs | 12 ++ .../TabularMetadata/CalculationItem.cs | 2 +- .../TabularCompare/TabularMetadata/Culture.cs | 2 +- .../TabularMetadata/DataSource.cs | 2 +- .../TabularMetadata/Expression.cs | 2 +- .../TabularCompare/TabularMetadata/Measure.cs | 2 +- .../TabularCompare/TabularMetadata/Model.cs | 2 +- .../TabularMetadata/Perspective.cs | 2 +- .../TabularMetadata/Relationship.cs | 2 +- .../TabularCompare/TabularMetadata/Role.cs | 2 +- .../TabularCompare/TabularMetadata/Table.cs | 2 +- .../TabularMetadata/TabularObject.cs | 16 ++- .../TabularCompare/UI/Options.Designer.cs | 105 ++++++++---------- .../TabularCompare/UI/Options.cs | 2 + BismNormalizer/BismNormalizer/app.config | 3 + .../source.extension.vsixmanifest | 2 +- 26 files changed, 128 insertions(+), 88 deletions(-) diff --git a/BismNormalizer/AlmToolkit/Program.cs b/BismNormalizer/AlmToolkit/Program.cs index 7e00369..9fc1b3a 100644 --- a/BismNormalizer/AlmToolkit/Program.cs +++ b/BismNormalizer/AlmToolkit/Program.cs @@ -33,6 +33,9 @@ namespace AlmToolkit } catch { } + // Default web requests like AAD Auth to use windows credentials for proxy auth + System.Net.WebRequest.DefaultWebProxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; + if (args != null && args.Length > 0) { if (args.Length > 1) diff --git a/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs b/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs index 8b478c9..a804795 100644 --- a/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs +++ b/BismNormalizer/AlmToolkit/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.14.1")] -[assembly: AssemblyFileVersion("5.0.14.1")] +[assembly: AssemblyVersion("5.0.19.0")] +[assembly: AssemblyFileVersion("5.0.19.0")] diff --git a/BismNormalizer/AlmToolkitSetup/AlmToolkitSetup.vdproj b/BismNormalizer/AlmToolkitSetup/AlmToolkitSetup.vdproj index ff5cc66..f30674b 100644 --- a/BismNormalizer/AlmToolkitSetup/AlmToolkitSetup.vdproj +++ b/BismNormalizer/AlmToolkitSetup/AlmToolkitSetup.vdproj @@ -2758,7 +2758,7 @@ { "Name" = "8:.NET Framework" "Message" = "8:[VSDNETMSG]" - "FrameworkVersion" = "8:v4.6.1 " + "FrameworkVersion" = "8:v4.6.1 " "AllowLaterVersions" = "11:FALSE" "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=671728" } @@ -2770,7 +2770,7 @@ { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:BismNormalizer, Version=5.0.13.0, Culture=neutral, PublicKeyToken=aa6675aad991a644, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:BismNormalizer, Version=5.0.19.0, Culture=neutral, PublicKeyToken=aa6675aad991a644, processorArchitecture=MSIL" "ScatterAssemblies" { "_0020EC0A2900F50F0F5DCC3E7BBE4237" @@ -5517,7 +5517,7 @@ { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.AnalysisServices.Tabular, Version=19.10.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Microsoft.AnalysisServices.Tabular, Version=19.12.7.2, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" "ScatterAssemblies" { "_7344099411A9D2DBF4A784E3DE9EA77D" @@ -6052,7 +6052,7 @@ { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.AnalysisServices.Tabular.Json, Version=19.10.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Microsoft.AnalysisServices.Tabular.Json, Version=19.12.7.2, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" "ScatterAssemblies" { "_82DAFE8276E3EAF6338E99A4D478878D" @@ -8283,7 +8283,7 @@ { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.AnalysisServices.Core, Version=19.10.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Microsoft.AnalysisServices.Core, Version=19.12.7.2, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" "ScatterAssemblies" { "_E6C48E30804B563751F799BDB82D2D5F" @@ -8505,7 +8505,7 @@ { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.AnalysisServices, Version=19.10.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Microsoft.AnalysisServices, Version=19.12.7.2, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" "ScatterAssemblies" { "_EEEF3B4DA37D965DCA452A1E7B283C82" @@ -8636,7 +8636,7 @@ { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Microsoft.AnalysisServices.SPClient.Interfaces, Version=19.10.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Microsoft.AnalysisServices.SPClient.Interfaces, Version=19.12.7.2, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" "ScatterAssemblies" { "_F27EC43FC3B12703E1AC626345868C2F" @@ -9173,15 +9173,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Power BI ALM Toolkit" - "ProductCode" = "8:{2E0BDA2B-E9E8-4EB5-8457-D605A99AE425}" - "PackageCode" = "8:{7DC33FCE-CA0B-49E6-8D38-925D0F3A6BD4}" + "ProductCode" = "8:{B6710539-C113-440C-AF14-CA2C17D9A5B0}" + "PackageCode" = "8:{7B4467F7-6352-49FC-A54E-AB68E6890C88}" "UpgradeCode" = "8:{96819CFD-6462-4AD1-ADB4-7903F30ADB92}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:TRUE" - "ProductVersion" = "8:5.0.14" + "ProductVersion" = "8:5.0.19" "Manufacturer" = "8:Power BI ALM Toolkit" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" diff --git a/BismNormalizer/BismNormalizer.CommandLine/Properties/AssemblyInfo.cs b/BismNormalizer/BismNormalizer.CommandLine/Properties/AssemblyInfo.cs index 1922660..e4e3774 100644 --- a/BismNormalizer/BismNormalizer.CommandLine/Properties/AssemblyInfo.cs +++ b/BismNormalizer/BismNormalizer.CommandLine/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.14.1")] -[assembly: AssemblyFileVersion("5.0.14.1")] +[assembly: AssemblyVersion("5.0.19.0")] +[assembly: AssemblyFileVersion("5.0.19.0")] diff --git a/BismNormalizer/BismNormalizer.IconSetup/Properties/AssemblyInfo.cs b/BismNormalizer/BismNormalizer.IconSetup/Properties/AssemblyInfo.cs index 985d673..aa548f6 100644 --- a/BismNormalizer/BismNormalizer.IconSetup/Properties/AssemblyInfo.cs +++ b/BismNormalizer/BismNormalizer.IconSetup/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.14.1")] -[assembly: AssemblyFileVersion("5.0.14.1")] +[assembly: AssemblyVersion("5.0.19.0")] +[assembly: AssemblyFileVersion("5.0.19.0")] diff --git a/BismNormalizer/BismNormalizer/BismNormalizer.IconSetup.exe b/BismNormalizer/BismNormalizer/BismNormalizer.IconSetup.exe index ac4f108a3ff6e605e42a6b266e4850b4a729c78b..a222d471acf0236d74515635906f85a162c23a23 100644 GIT binary patch delta 153 zcmZn&Xb70l!LnsXPr}BYU+m1n3=Eq)IrupR{!EKbch_|D*~LV(%ucO{hL<^K4D}w z(KDRfFC3}^QqKScOh7Ed$iVQ&5Qv2t7=nUbg6G^ncj$Y7sY9dt{fmo*g;s4A5ZS`S p&B(w9RLjZ$q&J@zt7l|2VbEhR+#D>i8Oof@EoBZBbeG!63jikBFBAX( diff --git a/BismNormalizer/BismNormalizer/BismNormalizer.exe b/BismNormalizer/BismNormalizer/BismNormalizer.exe index ce9b132409b8752d3818b98a608deff0f4c7e4c5..8ad763ca2977927a850c08bab0025e72be9ef429 100644 GIT binary patch delta 144 zcmZo@U~Fh$oY29tbw^La#-3%u%)$%|lTAgGLGhe|A(kENS|D_2n9# zx0^Q@#4#~j>KRNHG!6&ro19}TA)v<DaHoO+zbpra~N2G hSa|b!vvx*SO9nj#gU!(v{ZQuQ_m<{RL2aw6tN`J|Ft`8! delta 144 zcmZo@U~Fh$oY29tyXj*5#-3%u%zO-tlTAgGLGso3y*Y`9 True + + True + \ No newline at end of file diff --git a/BismNormalizer/BismNormalizer/TabularCompare/OptionsInfo.cs b/BismNormalizer/BismNormalizer/TabularCompare/OptionsInfo.cs index 242de52..a01edcd 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/OptionsInfo.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/OptionsInfo.cs @@ -19,6 +19,7 @@ namespace BismNormalizer.TabularCompare private bool _optionRoles; private bool _optionActions; private bool _optionPartitions; + private bool _optionLineageTag; private bool _optionRetainPartitions; private bool _optionRetainPolicyPartitions; private bool _optionRetainStorageMode; @@ -39,6 +40,7 @@ namespace BismNormalizer.TabularCompare _optionRoles = Settings.Default.OptionRoles; _optionActions = Settings.Default.OptionActions; _optionPartitions = Settings.Default.OptionPartitions; + _optionLineageTag = Settings.Default.OptionLineageTag; _optionRetainPartitions = Settings.Default.OptionRetainPartitions; _optionRetainPolicyPartitions = Settings.Default.OptionRetainPolicyPartitions; _optionRetainStorageMode = Settings.Default.OptionRetainStorageMode; @@ -112,6 +114,15 @@ namespace BismNormalizer.TabularCompare set { _optionPartitions = value; } } + /// + /// A Boolean specifying whether to consider LineageTag when comparing objects. + /// + public bool OptionLineageTag + { + get { return _optionLineageTag; } + set { _optionLineageTag = value; } + } + /// /// A Boolean specifying whether to retain partitions for table updates. /// @@ -189,6 +200,7 @@ namespace BismNormalizer.TabularCompare Settings.Default.OptionRoles = _optionRoles; Settings.Default.OptionActions = _optionActions; Settings.Default.OptionPartitions = _optionPartitions; + Settings.Default.OptionLineageTag = _optionLineageTag; Settings.Default.OptionRetainPartitions = _optionRetainPartitions; Settings.Default.OptionRetainPolicyPartitions = _optionRetainPolicyPartitions; Settings.Default.OptionRetainStorageMode = _optionRetainStorageMode; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/CalculationItem.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/CalculationItem.cs index a135a42..d4fd0d2 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/CalculationItem.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/CalculationItem.cs @@ -23,7 +23,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata /// Table object that the calculationItem belongs to. /// Tabular Object Model CalculationItem object abtstracted by the CalculationItem class. /// Indicates whether the calculationItem is a KPI. - public CalculationItem(Table parentTable, Tom.CalculationItem tomCalculationItem) : base(tomCalculationItem) + public CalculationItem(Table parentTable, Tom.CalculationItem tomCalculationItem) : base(tomCalculationItem, parentTable.ParentTabularModel) { _parentTable = parentTable; _tomCalculationItem = tomCalculationItem; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Culture.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Culture.cs index 619adda..7aaf9f2 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Culture.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Culture.cs @@ -22,7 +22,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata /// /// TabularModel object that the Culture object belongs to. /// Tabular Object Model Culture object abtstracted by the Culture class. - public Culture(TabularModel parentTabularModel, Tom.Culture tomCulture) : base(tomCulture) + public Culture(TabularModel parentTabularModel, Tom.Culture tomCulture) : base(tomCulture, parentTabularModel) { _parentTabularModel = parentTabularModel; _tomCulture = tomCulture; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/DataSource.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/DataSource.cs index 07d4da2..6bbfeba 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/DataSource.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/DataSource.cs @@ -18,7 +18,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata /// /// TabularModel object that the DataSource object belongs to. /// Tabular Object Model ProviderDataSource object abtstracted by the DataSource class. - public DataSource(TabularModel parentTabularModel, Microsoft.AnalysisServices.Tabular.DataSource dataSource) : base(dataSource) + public DataSource(TabularModel parentTabularModel, Microsoft.AnalysisServices.Tabular.DataSource dataSource) : base(dataSource, parentTabularModel) { _parentTabularModel = parentTabularModel; _tomDataSource = dataSource; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Expression.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Expression.cs index b25c1ec..02fb499 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Expression.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Expression.cs @@ -15,7 +15,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata /// /// TabularModel object that the Expression object belongs to. /// Tabular Object Model Expression object abtstracted by the Expression class. - public Expression(TabularModel parentTabularModel, NamedExpression expression) : base(expression) + public Expression(TabularModel parentTabularModel, NamedExpression expression) : base(expression, parentTabularModel) { _parentTabularModel = parentTabularModel; _tomExpression = expression; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Measure.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Measure.cs index 811dd0a..ff1effc 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Measure.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Measure.cs @@ -24,7 +24,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata /// Table object that the measure belongs to. /// Tabular Object Model Measure object abtstracted by the Measure class. /// Indicates whether the measure is a KPI. - public Measure(Table parentTable, Tom.Measure tomMeasure, bool isKpi) : base(tomMeasure) + public Measure(Table parentTable, Tom.Measure tomMeasure, bool isKpi) : base(tomMeasure, parentTable.ParentTabularModel) { _parentTable = parentTable; _tomMeasure = tomMeasure; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Model.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Model.cs index 118b542..640d2ca 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Model.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Model.cs @@ -22,7 +22,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata /// /// TabularModel object that the Model object belongs to. /// Tabular Object Model Model object abtstracted by the Model class. - public Model(TabularModel parentTabularModel, Tom.Model tomModel) : base(tomModel) + public Model(TabularModel parentTabularModel, Tom.Model tomModel) : base(tomModel, parentTabularModel) { _parentTabularModel = parentTabularModel; _tomModel = tomModel; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Perspective.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Perspective.cs index 560a5cb..987ea4d 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Perspective.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Perspective.cs @@ -17,7 +17,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata /// /// TabularModel object that the perspective belongs to. /// Tabular Object Model Perspective object abtstracted by the Perspective class. - public Perspective(TabularModel parentTabularModel, Tom.Perspective tomPerspective): base(tomPerspective) + public Perspective(TabularModel parentTabularModel, Tom.Perspective tomPerspective): base(tomPerspective, parentTabularModel) { _parentTabularModel = parentTabularModel; _tomPerspective = tomPerspective; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Relationship.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Relationship.cs index 054bb94..4bf873a 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Relationship.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Relationship.cs @@ -27,7 +27,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata /// Boolean indicating whether the TOM Relationship object Name property was changed to avoid name conflict. /// If the TOM Relationship object Name property was changed, this parameter shows the old value. public Relationship(Table table, SingleColumnRelationship tomRelationship, bool copiedFromSource = false, bool modifiedInternalName = false, string oldInternalName = "") - : base(tomRelationship) + : base(tomRelationship, table.ParentTabularModel) { _table = table; _tomRelationship = tomRelationship; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Role.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Role.cs index ba38498..236ce85 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Role.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Role.cs @@ -15,7 +15,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata /// /// TabularModel object that the Role object belongs to. /// Tabular Object Model Role object abtstracted by the Role class. - public Role(TabularModel parentTabularModel, ModelRole role) : base(role) + public Role(TabularModel parentTabularModel, ModelRole role) : base(role, parentTabularModel) { _parentTabularModel = parentTabularModel; _tomRole = role; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Table.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Table.cs index e912e45..d79dcd7 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Table.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/Table.cs @@ -29,7 +29,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata /// /// TabularModel object that the Table object belongs to. /// Tabular Object Model Table object abtstracted by the Table class. - public Table(TabularModel parentTabularModel, Tom.Table tomTable) : base(tomTable) + public Table(TabularModel parentTabularModel, Tom.Table tomTable) : base(tomTable, parentTabularModel) { _parentTabularModel = parentTabularModel; _tomTable = tomTable; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularObject.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularObject.cs index 1e9a140..f6aeb00 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularObject.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularObject.cs @@ -16,16 +16,19 @@ namespace BismNormalizer.TabularCompare.TabularMetadata { private string _objectDefinition; private string _name; + private TabularModel _parentTabularModel; /// /// Initializes a new instance of the TabularObject class. /// /// The Tabular Object Model supertype of the class being abstracted. - public TabularObject(NamedMetadataObject namedMetaDataObject) + public TabularObject(NamedMetadataObject namedMetaDataObject, TabularModel parentTabularModel) { _name = namedMetaDataObject.Name; if (namedMetaDataObject is Tom.Model) return; //Model has custom JSON string - + + _parentTabularModel = parentTabularModel; + //Serialize json SerializeOptions options = new SerializeOptions(); options.IgnoreInferredProperties = true; @@ -41,6 +44,15 @@ namespace BismNormalizer.TabularCompare.TabularMetadata _objectDefinition = token.ToString(Formatting.Indented); } + //Remove lineageTag if required + if (_parentTabularModel != null && _parentTabularModel.ComparisonInfo != null && + !_parentTabularModel.ComparisonInfo.OptionsInfo.OptionLineageTag) + { + JToken token = JToken.Parse(_objectDefinition); + RemovePropertyFromObjectDefinition(token, "lineageTag"); + _objectDefinition = token.ToString(Formatting.Indented); + } + ////todo: remove with Giri's fix ////Remove return characters //if (namedMetaDataObject is Tom.NamedExpression || namedMetaDataObject is Tom.Table) diff --git a/BismNormalizer/BismNormalizer/TabularCompare/UI/Options.Designer.cs b/BismNormalizer/BismNormalizer/TabularCompare/UI/Options.Designer.cs index 9d7c3b2..444697b 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/UI/Options.Designer.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/UI/Options.Designer.cs @@ -45,6 +45,7 @@ this.chkAffectedTables = new System.Windows.Forms.CheckBox(); this.cboProcessingOption = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); + this.chkLineageTag = new System.Windows.Forms.CheckBox(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); @@ -53,10 +54,9 @@ // this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(365, 538); - this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnCancel.Location = new System.Drawing.Point(274, 477); this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(100, 28); + this.btnCancel.Size = new System.Drawing.Size(75, 23); this.btnCancel.TabIndex = 21; this.btnCancel.Text = "Cancel"; this.btnCancel.UseVisualStyleBackColor = true; @@ -65,10 +65,9 @@ // this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOK.Location = new System.Drawing.Point(258, 538); - this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnOK.Location = new System.Drawing.Point(194, 477); this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(100, 28); + this.btnOK.Size = new System.Drawing.Size(75, 23); this.btnOK.TabIndex = 20; this.btnOK.Text = "OK"; this.btnOK.UseVisualStyleBackColor = true; @@ -79,10 +78,9 @@ this.chkRoles.AutoSize = true; this.chkRoles.Checked = true; this.chkRoles.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkRoles.Location = new System.Drawing.Point(18, 149); - this.chkRoles.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkRoles.Location = new System.Drawing.Point(14, 121); this.chkRoles.Name = "chkRoles"; - this.chkRoles.Size = new System.Drawing.Size(103, 20); + this.chkRoles.Size = new System.Drawing.Size(86, 17); this.chkRoles.TabIndex = 5; this.chkRoles.Text = "Include roles"; this.chkRoles.UseVisualStyleBackColor = true; @@ -90,10 +88,9 @@ // chkPartitions // this.chkPartitions.AutoSize = true; - this.chkPartitions.Location = new System.Drawing.Point(18, 186); - this.chkPartitions.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkPartitions.Location = new System.Drawing.Point(14, 151); this.chkPartitions.Name = "chkPartitions"; - this.chkPartitions.Size = new System.Drawing.Size(279, 20); + this.chkPartitions.Size = new System.Drawing.Size(224, 17); this.chkPartitions.TabIndex = 6; this.chkPartitions.Text = "Consider partitions when comparing tables"; this.chkPartitions.UseVisualStyleBackColor = true; @@ -105,10 +102,9 @@ this.chkMeasureDependencies.AutoSize = true; this.chkMeasureDependencies.Checked = true; this.chkMeasureDependencies.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkMeasureDependencies.Location = new System.Drawing.Point(18, 318); - this.chkMeasureDependencies.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkMeasureDependencies.Location = new System.Drawing.Point(14, 290); this.chkMeasureDependencies.Name = "chkMeasureDependencies"; - this.chkMeasureDependencies.Size = new System.Drawing.Size(51, 20); + this.chkMeasureDependencies.Size = new System.Drawing.Size(47, 17); this.chkMeasureDependencies.TabIndex = 7; this.chkMeasureDependencies.Text = "XXX"; this.chkMeasureDependencies.UseVisualStyleBackColor = true; @@ -116,10 +112,9 @@ // chkPerspectives // this.chkPerspectives.AutoSize = true; - this.chkPerspectives.Location = new System.Drawing.Point(18, 30); - this.chkPerspectives.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkPerspectives.Location = new System.Drawing.Point(14, 24); this.chkPerspectives.Name = "chkPerspectives"; - this.chkPerspectives.Size = new System.Drawing.Size(151, 20); + this.chkPerspectives.Size = new System.Drawing.Size(124, 17); this.chkPerspectives.TabIndex = 3; this.chkPerspectives.Text = "Include perspectives"; this.chkPerspectives.UseVisualStyleBackColor = true; @@ -130,6 +125,7 @@ this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.chkLineageTag); this.groupBox1.Controls.Add(this.chkRetainStorageMode); this.groupBox1.Controls.Add(this.chkRetainPolicyPartitions); this.groupBox1.Controls.Add(this.chkRetainPartitions); @@ -140,11 +136,9 @@ this.groupBox1.Controls.Add(this.chkMeasureDependencies); this.groupBox1.Controls.Add(this.chkPartitions); this.groupBox1.Controls.Add(this.chkRoles); - this.groupBox1.Location = new System.Drawing.Point(16, 14); - this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox1.Location = new System.Drawing.Point(12, 11); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.groupBox1.Size = new System.Drawing.Size(450, 377); + this.groupBox1.Size = new System.Drawing.Size(338, 346); this.groupBox1.TabIndex = 22; this.groupBox1.TabStop = false; this.groupBox1.Text = "Comparison Options"; @@ -152,10 +146,9 @@ // chkRetainStorageMode // this.chkRetainStorageMode.AutoSize = true; - this.chkRetainStorageMode.Location = new System.Drawing.Point(18, 286); - this.chkRetainStorageMode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkRetainStorageMode.Location = new System.Drawing.Point(14, 264); this.chkRetainStorageMode.Name = "chkRetainStorageMode"; - this.chkRetainStorageMode.Size = new System.Drawing.Size(258, 20); + this.chkRetainStorageMode.Size = new System.Drawing.Size(207, 17); this.chkRetainStorageMode.TabIndex = 12; this.chkRetainStorageMode.Text = "For table updates, retain storage mode"; this.chkRetainStorageMode.UseVisualStyleBackColor = true; @@ -164,10 +157,9 @@ // this.chkRetainPolicyPartitions.AutoSize = true; this.chkRetainPolicyPartitions.Enabled = false; - this.chkRetainPolicyPartitions.Location = new System.Drawing.Point(46, 250); - this.chkRetainPolicyPartitions.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkRetainPolicyPartitions.Location = new System.Drawing.Point(34, 235); this.chkRetainPolicyPartitions.Name = "chkRetainPolicyPartitions"; - this.chkRetainPolicyPartitions.Size = new System.Drawing.Size(277, 20); + this.chkRetainPolicyPartitions.Size = new System.Drawing.Size(221, 17); this.chkRetainPolicyPartitions.TabIndex = 11; this.chkRetainPolicyPartitions.Text = "Retain only refresh-policy based partitions"; this.chkRetainPolicyPartitions.UseVisualStyleBackColor = true; @@ -175,10 +167,9 @@ // chkRetainPartitions // this.chkRetainPartitions.AutoSize = true; - this.chkRetainPartitions.Location = new System.Drawing.Point(18, 224); - this.chkRetainPartitions.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkRetainPartitions.Location = new System.Drawing.Point(14, 214); this.chkRetainPartitions.Name = "chkRetainPartitions"; - this.chkRetainPartitions.Size = new System.Drawing.Size(228, 20); + this.chkRetainPartitions.Size = new System.Drawing.Size(185, 17); this.chkRetainPartitions.TabIndex = 10; this.chkRetainPartitions.Text = "For table updates, retain partitions"; this.chkRetainPartitions.UseVisualStyleBackColor = true; @@ -188,10 +179,9 @@ // this.chkMergeCultures.AutoSize = true; this.chkMergeCultures.Enabled = false; - this.chkMergeCultures.Location = new System.Drawing.Point(46, 118); - this.chkMergeCultures.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkMergeCultures.Location = new System.Drawing.Point(34, 96); this.chkMergeCultures.Name = "chkMergeCultures"; - this.chkMergeCultures.Size = new System.Drawing.Size(335, 20); + this.chkMergeCultures.Size = new System.Drawing.Size(270, 17); this.chkMergeCultures.TabIndex = 9; this.chkMergeCultures.Text = "For culture updates, merge translations (not replace)"; this.chkMergeCultures.UseVisualStyleBackColor = true; @@ -199,10 +189,9 @@ // chkCultures // this.chkCultures.AutoSize = true; - this.chkCultures.Location = new System.Drawing.Point(18, 92); - this.chkCultures.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkCultures.Location = new System.Drawing.Point(14, 75); this.chkCultures.Name = "chkCultures"; - this.chkCultures.Size = new System.Drawing.Size(119, 20); + this.chkCultures.Size = new System.Drawing.Size(101, 17); this.chkCultures.TabIndex = 8; this.chkCultures.Text = "Include cultures"; this.chkCultures.UseVisualStyleBackColor = true; @@ -212,10 +201,9 @@ // this.chkMergePerspectives.AutoSize = true; this.chkMergePerspectives.Enabled = false; - this.chkMergePerspectives.Location = new System.Drawing.Point(46, 57); - this.chkMergePerspectives.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkMergePerspectives.Location = new System.Drawing.Point(34, 46); this.chkMergePerspectives.Name = "chkMergePerspectives"; - this.chkMergePerspectives.Size = new System.Drawing.Size(360, 20); + this.chkMergePerspectives.Size = new System.Drawing.Size(287, 17); this.chkMergePerspectives.TabIndex = 4; this.chkMergePerspectives.Text = "For perspective updates, merge selections (not replace)"; this.chkMergePerspectives.UseVisualStyleBackColor = true; @@ -227,11 +215,9 @@ this.groupBox2.Controls.Add(this.chkAffectedTables); this.groupBox2.Controls.Add(this.cboProcessingOption); this.groupBox2.Controls.Add(this.label1); - this.groupBox2.Location = new System.Drawing.Point(16, 399); - this.groupBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox2.Location = new System.Drawing.Point(12, 364); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.groupBox2.Size = new System.Drawing.Size(450, 124); + this.groupBox2.Size = new System.Drawing.Size(338, 101); this.groupBox2.TabIndex = 23; this.groupBox2.TabStop = false; this.groupBox2.Text = "Database Deployment"; @@ -241,10 +227,9 @@ this.chkAffectedTables.AutoSize = true; this.chkAffectedTables.Checked = true; this.chkAffectedTables.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkAffectedTables.Location = new System.Drawing.Point(18, 78); - this.chkAffectedTables.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chkAffectedTables.Location = new System.Drawing.Point(14, 63); this.chkAffectedTables.Name = "chkAffectedTables"; - this.chkAffectedTables.Size = new System.Drawing.Size(196, 20); + this.chkAffectedTables.Size = new System.Drawing.Size(159, 17); this.chkAffectedTables.TabIndex = 9; this.chkAffectedTables.Text = "Process only affected tables"; this.chkAffectedTables.UseVisualStyleBackColor = true; @@ -259,35 +244,42 @@ "Default", "Do Not Process", "Full"}); - this.cboProcessingOption.Location = new System.Drawing.Point(152, 30); - this.cboProcessingOption.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.cboProcessingOption.Location = new System.Drawing.Point(114, 24); this.cboProcessingOption.Name = "cboProcessingOption"; - this.cboProcessingOption.Size = new System.Drawing.Size(173, 24); + this.cboProcessingOption.Size = new System.Drawing.Size(131, 21); this.cboProcessingOption.TabIndex = 8; // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(16, 34); - this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Location = new System.Drawing.Point(12, 28); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(121, 16); + this.label1.Size = new System.Drawing.Size(96, 13); this.label1.TabIndex = 0; this.label1.Text = "Processing Option:"; // + // chkLineageTag + // + this.chkLineageTag.AutoSize = true; + this.chkLineageTag.Location = new System.Drawing.Point(14, 182); + this.chkLineageTag.Name = "chkLineageTag"; + this.chkLineageTag.Size = new System.Drawing.Size(208, 17); + this.chkLineageTag.TabIndex = 13; + this.chkLineageTag.Text = "Consider LineageTag when comparing"; + this.chkLineageTag.UseVisualStyleBackColor = true; + // // Options // this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(482, 586); + this.ClientSize = new System.Drawing.Size(362, 516); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnOK); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "Options"; @@ -323,5 +315,6 @@ private System.Windows.Forms.CheckBox chkRetainPartitions; private System.Windows.Forms.CheckBox chkRetainPolicyPartitions; private System.Windows.Forms.CheckBox chkRetainStorageMode; + private System.Windows.Forms.CheckBox chkLineageTag; } } \ No newline at end of file diff --git a/BismNormalizer/BismNormalizer/TabularCompare/UI/Options.cs b/BismNormalizer/BismNormalizer/TabularCompare/UI/Options.cs index 00fec4c..0c23115 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/UI/Options.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/UI/Options.cs @@ -50,6 +50,7 @@ namespace BismNormalizer.TabularCompare.UI chkRoles.Checked = _comparisonInfo.OptionsInfo.OptionRoles; //chkActions.Checked = _comparisonInfo.OptionsInfo.OptionActions; chkPartitions.Checked = _comparisonInfo.OptionsInfo.OptionPartitions; + chkLineageTag.Checked = _comparisonInfo.OptionsInfo.OptionLineageTag; chkRetainPartitions.Checked = _comparisonInfo.OptionsInfo.OptionRetainPartitions; chkRetainPolicyPartitions.Checked = _comparisonInfo.OptionsInfo.OptionRetainPolicyPartitions; chkRetainStorageMode.Checked = _comparisonInfo.OptionsInfo.OptionRetainStorageMode; @@ -70,6 +71,7 @@ namespace BismNormalizer.TabularCompare.UI //_comparisonInfo.OptionsInfo.OptionActions = chkActions.Checked; _comparisonInfo.OptionsInfo.OptionActions = false; _comparisonInfo.OptionsInfo.OptionPartitions = chkPartitions.Checked; + _comparisonInfo.OptionsInfo.OptionLineageTag = chkLineageTag.Checked; _comparisonInfo.OptionsInfo.OptionRetainPartitions = chkRetainPartitions.Checked; _comparisonInfo.OptionsInfo.OptionRetainPolicyPartitions = chkRetainPolicyPartitions.Checked; _comparisonInfo.OptionsInfo.OptionRetainStorageMode = chkRetainStorageMode.Checked; diff --git a/BismNormalizer/BismNormalizer/app.config b/BismNormalizer/BismNormalizer/app.config index a18ec4c..ce30cf9 100644 --- a/BismNormalizer/BismNormalizer/app.config +++ b/BismNormalizer/BismNormalizer/app.config @@ -88,6 +88,9 @@ True + + True + diff --git a/BismNormalizer/BismNormalizer/source.extension.vsixmanifest b/BismNormalizer/BismNormalizer/source.extension.vsixmanifest index 1c9a388..0bd4aaf 100644 --- a/BismNormalizer/BismNormalizer/source.extension.vsixmanifest +++ b/BismNormalizer/BismNormalizer/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + BISM Normalizer BISM Normalizer manages Analysis Services tabular models http://bism-normalizer.com/