diff --git a/src/Dax.Model.Extractor.Tests/DaxModelFixture.cs b/src/Dax.Model.Extractor.Tests/DaxModelFixture.cs index 7959fb6..4bc58b0 100644 --- a/src/Dax.Model.Extractor.Tests/DaxModelFixture.cs +++ b/src/Dax.Model.Extractor.Tests/DaxModelFixture.cs @@ -1,6 +1,5 @@ namespace Dax.Model.Extractor.Tests { - using Dax.Metadata.Extractor; using Microsoft.AnalysisServices; using System.IO; using TOM = Microsoft.AnalysisServices.Tabular; diff --git a/src/Dax.Model.Extractor.Tests/DaxModelTests.cs b/src/Dax.Model.Extractor.Tests/DaxModelTests.cs index 595bd33..ee3e0c6 100644 --- a/src/Dax.Model.Extractor.Tests/DaxModelTests.cs +++ b/src/Dax.Model.Extractor.Tests/DaxModelTests.cs @@ -1,6 +1,5 @@ namespace Dax.Model.Extractor.Tests { - using Dax.Metadata.Extractor; using Microsoft.AnalysisServices; using System.Linq; using Xunit; diff --git a/src/Dax.Model.Extractor.Tests/TomExtractorTests.cs b/src/Dax.Model.Extractor.Tests/TomExtractorTests.cs index 77aefbc..b799ca5 100644 --- a/src/Dax.Model.Extractor.Tests/TomExtractorTests.cs +++ b/src/Dax.Model.Extractor.Tests/TomExtractorTests.cs @@ -1,6 +1,5 @@ namespace Dax.Model.Extractor.Tests { - using Dax.Metadata.Extractor; using Microsoft.AnalysisServices; using System; using Xunit; diff --git a/src/Dax.Model.Extractor/Data/IDbConnectionExtensions.cs b/src/Dax.Model.Extractor/Data/IDbConnectionExtensions.cs index c5aec2a..4e2921c 100644 --- a/src/Dax.Model.Extractor/Data/IDbConnectionExtensions.cs +++ b/src/Dax.Model.Extractor/Data/IDbConnectionExtensions.cs @@ -1,5 +1,4 @@ -using Dax.Metadata.Extractor; -using Microsoft.AnalysisServices.AdomdClient; +using Microsoft.AnalysisServices.AdomdClient; using System.Data; using System.Data.OleDb; diff --git a/src/Dax.Model.Extractor/DmvExtractor.cs b/src/Dax.Model.Extractor/DmvExtractor.cs index 0b36d02..9a86a98 100644 --- a/src/Dax.Model.Extractor/DmvExtractor.cs +++ b/src/Dax.Model.Extractor/DmvExtractor.cs @@ -1,6 +1,5 @@ -using Dax.Model.Extractor.Data; -using Microsoft.AnalysisServices; -using Microsoft.AnalysisServices.AdomdClient; +using Dax.Metadata; +using Dax.Model.Extractor.Data; using System; using System.Collections.Generic; using System.Data; @@ -8,7 +7,7 @@ using System.Linq; using Tom = Microsoft.AnalysisServices.Tabular; -namespace Dax.Metadata.Extractor +namespace Dax.Model.Extractor { public class ExtractorException : Exception @@ -67,7 +66,7 @@ public DmvExtractor(Dax.Metadata.Model daxModel, IDbConnection connection, strin public static void PopulateFromDmv(Dax.Metadata.Model daxModel, IDbConnection connection, string serverName, string databaseName, string extractorApp, string extractorVersion) { - Dax.Metadata.Extractor.DmvExtractor de = new Dax.Metadata.Extractor.DmvExtractor(daxModel, connection, serverName, databaseName, extractorApp, extractorVersion); + var de = new DmvExtractor(daxModel, connection, serverName, databaseName, extractorApp, extractorVersion); de.PopulateModel(); de.PopulateTables(); de.PopulatePartitions(); @@ -1099,12 +1098,12 @@ SELECT DISTINCT } } } - catch (AdomdErrorResponseException ex) + catch (Microsoft.AnalysisServices.AdomdClient.AdomdErrorResponseException ex) { // We ignore errors accessing this DMV Debug.WriteLine($"Ignored error in DISCOVER_CALC_DEPENDENCY: {ex.Message}"); } - catch (AmoException ex) + catch (Microsoft.AnalysisServices.AmoException ex) { Debug.WriteLine($"Ignored error in DISCOVER_CALC_DEPENDENCY: {ex.Message}"); } diff --git a/src/Dax.Model.Extractor/StatExtractor.cs b/src/Dax.Model.Extractor/StatExtractor.cs index 12373cf..41d6cb7 100644 --- a/src/Dax.Model.Extractor/StatExtractor.cs +++ b/src/Dax.Model.Extractor/StatExtractor.cs @@ -1,9 +1,10 @@ -using Dax.Model.Extractor.Data; +using Dax.Metadata; +using Dax.Model.Extractor.Data; using System; using System.Data; using System.Linq; -namespace Dax.Metadata.Extractor +namespace Dax.Model.Extractor { public class StatExtractor { diff --git a/src/Dax.Model.Extractor/TomExtractor.cs b/src/Dax.Model.Extractor/TomExtractor.cs index c834853..bfe7440 100644 --- a/src/Dax.Model.Extractor/TomExtractor.cs +++ b/src/Dax.Model.Extractor/TomExtractor.cs @@ -1,10 +1,11 @@ -using Microsoft.AnalysisServices.AdomdClient; +using Dax.Metadata; +using Microsoft.AnalysisServices.AdomdClient; using System; using System.Data.OleDb; using System.Linq; using Tom = Microsoft.AnalysisServices.Tabular; -namespace Dax.Metadata.Extractor +namespace Dax.Model.Extractor { public class TomExtractor { @@ -289,20 +290,21 @@ public static Dax.Metadata.Model GetDaxModel(string connectionString, string app string databaseName = database.Name; string serverName = GetDataSource(connectionString); - Model daxModel = Dax.Metadata.Extractor.TomExtractor.GetDaxModel(tomModel, applicationName, applicationVersion); + var daxModel = TomExtractor.GetDaxModel(tomModel, applicationName, applicationVersion); - using (AdomdConnection connection = new(connectionString)) { + using (AdomdConnection connection = new(connectionString)) + { // Populate statistics from DMV - Dax.Metadata.Extractor.DmvExtractor.PopulateFromDmv(daxModel, connection, serverName, databaseName, applicationName, applicationVersion); + DmvExtractor.PopulateFromDmv(daxModel, connection, serverName, databaseName, applicationName, applicationVersion); // Populate statistics by querying the data model if (readStatisticsFromData) { - Dax.Metadata.Extractor.StatExtractor.UpdateStatisticsModel(daxModel, connection, sampleRows, analyzeDirectQuery, analyzeDirectLake); + StatExtractor.UpdateStatisticsModel(daxModel, connection, sampleRows, analyzeDirectQuery, analyzeDirectLake); // if we have forced all columns into memory then re-run the DMVs to update the data with the new values after everything has been transcoded. if (analyzeDirectLake > DirectLakeExtractionMode.ResidentOnly) - Dax.Metadata.Extractor.DmvExtractor.PopulateFromDmv(daxModel, connection, serverName, databaseName, applicationName, applicationVersion); + DmvExtractor.PopulateFromDmv(daxModel, connection, serverName, databaseName, applicationName, applicationVersion); } } return daxModel; @@ -344,23 +346,23 @@ public static Dax.Metadata.Model GetDaxModel(string serverName, string databaseN Tom.Database db = GetDatabase(serverName, databaseName); Tom.Model tomModel = db.Model; - Model daxModel = Dax.Metadata.Extractor.TomExtractor.GetDaxModel(tomModel, applicationName, applicationVersion); + var daxModel = TomExtractor.GetDaxModel(tomModel, applicationName, applicationVersion); string connectionString = GetConnectionString(serverName, databaseName); using (AdomdConnection connection = new(connectionString)) { // Populate statistics from DMV - Dax.Metadata.Extractor.DmvExtractor.PopulateFromDmv(daxModel, connection, serverName, databaseName, applicationName, applicationVersion); + DmvExtractor.PopulateFromDmv(daxModel, connection, serverName, databaseName, applicationName, applicationVersion); // Populate statistics by querying the data model if (readStatisticsFromData) { - Dax.Metadata.Extractor.StatExtractor.UpdateStatisticsModel(daxModel, connection, sampleRows, analyzeDirectQuery, analyzeDirectLake); + StatExtractor.UpdateStatisticsModel(daxModel, connection, sampleRows, analyzeDirectQuery, analyzeDirectLake); // if we have forced all columns into memory then re-run the DMVs to update the data with the new values after everything has been transcoded. if (analyzeDirectLake > DirectLakeExtractionMode.ResidentOnly) - Dax.Metadata.Extractor.DmvExtractor.PopulateFromDmv(daxModel, connection, serverName, databaseName, applicationName, applicationVersion); + DmvExtractor.PopulateFromDmv(daxModel, connection, serverName, databaseName, applicationName, applicationVersion); } } return daxModel; diff --git a/src/Dax.Model.Extractor/Util.cs b/src/Dax.Model.Extractor/Util.cs index 9d0305d..a7f282e 100644 --- a/src/Dax.Model.Extractor/Util.cs +++ b/src/Dax.Model.Extractor/Util.cs @@ -4,7 +4,7 @@ using System.Diagnostics; using Tom = Microsoft.AnalysisServices; -namespace Dax.Metadata.Extractor +namespace Dax.Model.Extractor { internal class ExtractorInfo { diff --git a/src/Dax.Vpax.Tests/VpaxToolTests.cs b/src/Dax.Vpax.Tests/VpaxToolTests.cs index 2b2e6f5..7f2f1af 100644 --- a/src/Dax.Vpax.Tests/VpaxToolTests.cs +++ b/src/Dax.Vpax.Tests/VpaxToolTests.cs @@ -1,6 +1,6 @@ namespace Dax.Vpax.Tests { - using Dax.Metadata.Extractor; + using Dax.Model.Extractor; using Dax.Vpax.Tools; using Microsoft.AnalysisServices; using System;