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 This is an ETL Component that reads data from SugarCRM. 24 """ 25 26 from etl.component import component28 """ 29 This is an ETL Component that reads data from SugarCRM 30 31 """6032 - def __init__(self, sugarcrm_connector, module, name='componet.input.sugarcrm_in', transformer=False, row_limit=0):33 """ 34 Required Parameters 35 sugarcrm_connector : SugarCRM connector. 36 module : Name of the module. 37 38 Extra Parameters 39 name : Name of Component. 40 transformer : Transformer object to transform string data into particular type. 41 row_limit : Limited records are sent to destination if row limit is specified. If row limit is 0, all records are sent. 42 """ 43 44 super(sugarcrm_in, self).__init__(name=name, connector=sugarcrm_connector, transformer=transformer, row_limit=row_limit) 45 self._type = 'componet.input.sugarcrm_in' 46 self.module = module4749 res = sugarcrm_in(self.sugarcrm_connector, self.module, self.name, self.transformer, self.row_limit) 50 return res5162 #TODO 63 from etl_test import etl_test 64 import etl 65 sugarcrm_conn=etl.connector.sugarcrm_connector('admin','sugarpasswd',url='http://192.168.0.7/sugarcrm/soap.php') 66 test = etl_test.etl_component_test(sugarcrm_in(sugarcrm_conn, 'Contacts')) 67 res=test.output() 68 print res69 70 if __name__ == '__main__': 71 test() 72
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Wed Apr 29 20:27:03 2009 | http://epydoc.sourceforge.net |