Home | Trees | Indices | Help |
---|
|
1 # -*- encoding: utf-8 -*- 2 ############################################################################## 3 # 4 # ETL system- Extract Transfer Load system 5 # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved 6 # $Id$ 7 # 8 # This program is free software: you can redistribute it and/or modify 9 # it under the terms of the GNU General Public License as published by 10 # the Free Software Foundation, either version 3 of the License, or 11 # (at your option) any later version. 12 # 13 # This program is distributed in the hope that it will be useful, 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 # GNU General Public License for more details. 17 # 18 # You should have received a copy of the GNU General Public License 19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 20 # 21 ############################################################################## 22 """ 23 ETL Process. 24 25 This is the main file of ETL which includes several test functions. 26 27 """ 28 # TODO : 29 # - make good documentation and test with doctest 30 # - Integrate profiler in the job code: cProfile 31 # - do a unittest system and implement unit tests on components file 32 3335 #TODO : avoid using .CSV files, povide stringIO with string directly in the __main__ 36 fileconnector = etl.connector.localfile('demo/data/invoice.csv') 37 transformer.description = {'id': etl.transformer.LONG, 'name': etl.transformer.STRING, 'invoice_date': etl.transformer.DATE, 'invoice_amount': etl.transformer.FLOAT, 'is_paid': etl.transformer.BOOLEAN} 38 transformer = etl.transformer(transformer.description) 39 csv_in1 = etl.component.input.csv_in.csv_in(fileconnector=fileconnector, transformer=transformer) 40 log1 = etl.component.transform.logger.logger(name='Read Invoice File') 41 tran = etl.etl.transition(csv_in1, log1) 42 job1 = etl.etl.job([log1]) 43 job1.run()44 45 if __name__ == '__main__': 46 #TODO : make perfect testing method 47 pass 48
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Wed Apr 29 20:37:25 2009 | http://epydoc.sourceforge.net |