diff --git a/BismNormalizer/BismNormalizer/TabularCompare/ConnectionInfo.cs b/BismNormalizer/BismNormalizer/TabularCompare/ConnectionInfo.cs index 1e504cd..2faef88 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/ConnectionInfo.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/ConnectionInfo.cs @@ -729,6 +729,10 @@ $@"{{ public string BuildConnectionString() { string connectionString = $"Provider=MSOLAP;Data Source={this.ServerName};"; + if (!String.IsNullOrEmpty(this.DatabaseName)) + { + connectionString += $"Initial Catalog={this.DatabaseName};"; + } if (this.CredsProvided) { connectionString += $"User ID={this.Username};Password={this.Password};"; diff --git a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularModel.cs b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularModel.cs index de758b3..cfd715e 100644 --- a/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularModel.cs +++ b/BismNormalizer/BismNormalizer/TabularCompare/TabularMetadata/TabularModel.cs @@ -2283,7 +2283,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata XmlNodeList partitionNodeList = document.GetElementsByTagName("Partition"); XmlNodeList tableNodeList = document.GetElementsByTagName("Table"); - if (partitionNodeList != null && tableNodeList != null) + if (partitionNodeList != null && partitionNodeList.Count > 0 && tableNodeList != null && tableNodeList.Count > 0) { if (_tablesToProcess.ContainsId(tableNodeList[0].InnerText)) {