@@ -296,8 +296,13 @@ public static Dax.Metadata.Model GetDaxModel(string connectionString, string app
296
296
Dax . Metadata . Extractor . DmvExtractor . PopulateFromDmv ( daxModel , connection , serverName , databaseName , applicationName , applicationVersion ) ;
297
297
298
298
// Populate statistics by querying the data model
299
- if ( readStatisticsFromData ) {
299
+ if ( readStatisticsFromData )
300
+ {
300
301
Dax . Metadata . Extractor . StatExtractor . UpdateStatisticsModel ( daxModel , connection , sampleRows , analyzeDirectQuery , analyzeDirectLake ) ;
302
+
303
+ // 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.
304
+ if ( analyzeDirectLake > DirectLakeExtractionMode . ResidentOnly )
305
+ Dax . Metadata . Extractor . DmvExtractor . PopulateFromDmv ( daxModel , connection , serverName , databaseName , applicationName , applicationVersion ) ;
301
306
}
302
307
}
303
308
return daxModel ;
@@ -351,12 +356,11 @@ public static Dax.Metadata.Model GetDaxModel(string serverName, string databaseN
351
356
// Populate statistics by querying the data model
352
357
if ( readStatisticsFromData )
353
358
{
354
- Dax . Metadata . Extractor . StatExtractor . UpdateStatisticsModel ( daxModel , connection , sampleRows , analyzeDirectQuery , analyzeDirectLake ) ;
355
- }
359
+ Dax . Metadata . Extractor . StatExtractor . UpdateStatisticsModel ( daxModel , connection , sampleRows , analyzeDirectQuery , analyzeDirectLake ) ;
356
360
357
- // 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.
358
- if ( analyzeDirectLake > DirectLakeExtractionMode . ResidentOnly ) {
359
- Dax . Metadata . Extractor . DmvExtractor . PopulateFromDmv ( daxModel , connection , serverName , databaseName , applicationName , applicationVersion ) ;
361
+ // 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.
362
+ if ( analyzeDirectLake > DirectLakeExtractionMode . ResidentOnly )
363
+ Dax . Metadata . Extractor . DmvExtractor . PopulateFromDmv ( daxModel , connection , serverName , databaseName , applicationName , applicationVersion ) ;
360
364
}
361
365
}
362
366
return daxModel ;
0 commit comments