Exemple #1
0
        public DataLookUpCollection(IDataSource dataSource, IEtLogger logger)
        {
            this._logger           = logger;
            this._dataTable        = new DataTable();
            this.useDataTable      = false;
            this._dictionaryLookup = new Dictionary <string, string>();

            this.Columns = dataSource.GetHeaders();
            if (this.Columns.Length > 2)
            {
                foreach (string item in this.Columns)
                {
                    this._dataTable.Columns.Add(item);
                }
                this.useDataTable = false;
            }
            foreach (DataCellCollection item in dataSource.GetDataRowEntries())
            {
                string[] row = item.Cells.Select(c => c.Value).ToArray();
                if (this.useDataTable)
                {
                    this._dataTable.Rows.Add(row);
                }
                else
                {
                    this._dictionaryLookup.Add(row[0], row[1]);
                }
            }
        }
Exemple #2
0
 public CsvDataSinkKind(string destFileName, IEtLogger etLogger, string destTemplateConfigurationFile)
 {
     this._destFileName = destFileName;
     this._logger       = etLogger;
     this._destTemplateConfigurationFile = destTemplateConfigurationFile;
     this.Initialize();
 }
 public CsvDataSourceKInd(string sourceFileName, IDataCleaner dataCleaner, IEtLogger logger)
 {
     this._sourceFileName = sourceFileName;
     this._logger         = logger;
     this._dataCleaner    = dataCleaner;
     this.Columns         = new List <Column>();
 }
Exemple #4
0
 public SourceToSinkDataChainBuilder(IEtLogger logger)
 {
     this._logger       = logger;
     this.Chain         = new Dictionary <string, string>();
     this._steps        = new Dictionary <string, Dictionary <string, string> >();
     this.SinkColumns   = new HashSet <string>();
     this.SourceColumns = new HashSet <string>();
     this.LookUps       = new Dictionary <string, HashSet <string> >();
 }
Exemple #5
0
 public DataResolver(Dictionary <string, IDataMapper> dataMappers, Dictionary <string, IDataFilter> dataFilter, IEtLogger logger)
 {
     this._dataMappers = dataMappers;
     this._dataFilter  = dataFilter;
     foreach (KeyValuePair <string, IDataMapper> item in dataMappers)
     {
         item.Value.BindToLookUpCollection(this._globalLookUpCollection);
     }
     this._logger = logger;
 }
Exemple #6
0
 public ET_Engine(IDataSourceFactory dataSourceFactory,
                  IDataResolver dataResolver,
                  IDataSinkFactory dataSinkFactory,
                  IEtLogger logger,
                  IDiskIOHandler diskIOHandler,
                  RuntimeArgs runtimeSettings)
 {
     this._dataSourceFactory      = dataSourceFactory;
     this._dataMapHandler         = dataResolver;
     this._dataSinkFactory        = dataSinkFactory;
     this._logger                 = logger;
     this._diskIOHandler          = diskIOHandler;
     this._runtimeSettings        = runtimeSettings;
     this._toSinkDataChainBuilder = new SourceToSinkDataChainBuilder(logger);
 }
Exemple #7
0
 public CsvDataSource(string sourceFileName, IDataCleaner dataCleaner, IEtLogger logger) : base(sourceFileName, dataCleaner, logger) => this.IsDataClean();
Exemple #8
0
 public CsvDataSink(string outputFileName, IEtLogger etLogger, string outConfigurationFile) : base(outputFileName, etLogger, outConfigurationFile)
 {
 }
 public DataSourceFactory(IEtLogger etLogger, IDataCleanerFactory dataCleanerFactory)
 {
     this._logger             = etLogger;
     this._dataCleanerFactory = dataCleanerFactory;
 }
 public DataSinkFactory(IEtLogger logger) => this._logger = logger;