private void createAnalyzers ( final AnalysisJobBuilder ajb , final Class < ? extends Analyzer < ? > > analyzerClass , final List < InputColumn < ? > > columns ) { final int columnsPerAnalyzer = getColumnsPerAnalyzer ( ) ; AnalyzerComponentBuilder < ? > analyzerJobBuilder = ajb . addAnalyzer ( analyzerClass ) ; int columnCount = 0 ; for ( final InputColumn < ? > inputColumn : columns ) { if ( columnCount == columnsPerAnalyzer ) { analyzerJobBuilder = ajb . addAnalyzer ( analyzerClass ) ; columnCount = 0 ; } analyzerJobBuilder . addInputColumn ( inputColumn ) ; if ( isIncludeValueDistribution ( ) ) { ajb . addAnalyzer ( ValueDistributionAnalyzer . class ) . addInputColumn ( inputColumn ) ; } if ( inputColumn . getDataType ( ) == String . class && isIncludePatternFinder ( ) ) { ajb . addAnalyzer ( PatternFinderAnalyzer . class ) . addInputColumn ( inputColumn ) ; } columnCount ++ ; } }
Registers analyzers and up to 4 columns per analyzer . This restriction is to ensure that results will be nicely readable . A table might contain hundreds of columns .