kettle调用java程序_Kettle ETL调用 java代码来进行数据库的增删改查

1 packagecom.zxyp.kettle;2

3 importorg.pentaho.di.cluster.ClusterSchema;4 importorg.pentaho.di.cluster.SlaveServer;5 importorg.pentaho.di.core.KettleEnvironment;6 importorg.pentaho.di.core.database.DatabaseMeta;7 importorg.pentaho.di.core.exception.KettleException;8 importorg.pentaho.di.core.logging.LogLevel;9 importorg.pentaho.di.core.util.EnvUtil;10 importorg.pentaho.di.job.Job;11 importorg.pentaho.di.job.JobExecutionConfiguration;12 importorg.pentaho.di.job.JobMeta;13 importorg.pentaho.di.repository.RepositoryDirectoryInterface;14 importorg.pentaho.di.repository.kdr.KettleDatabaseRepository;15 importorg.pentaho.di.repository.kdr.KettleDatabaseRepositoryMeta;16 importorg.pentaho.di.trans.Trans;17 importorg.pentaho.di.trans.TransExecutionConfiguration;18 importorg.pentaho.di.trans.TransMeta;19

20 public classKettleUtil {21

22 private String connetionName = "carte";23 private String databaseType = "MYSQL";24 private String connectionType = "Native(JDBC)";25 private String hostAddress = "192.168.10.147";26 private String databaseName = "kettle";27 private String databasePort = "3306";28 private String userName = "root";29 private String password = "root";30 private String repoName = "repo";31 private String repoUserName = "admin";32 private String repoPassword = "admin";33 private String repoJobDir = "/";34 private String repoTransDir = "/";35 private String slaveName = "master";36 private String slaveHostname = "192.168.10.147";37 private String slavePort = "8080";38 private String slaveUsername = "cluster";39 private String slavePassword = "cluster";40

41 publicString getConnetionName() {42 returnconnetionName;43 }44

45 public voidsetConnetionName(String connetionName) {46 this.connetionName =connetionName;47 }48

49 publicString getDatabaseType() {50 returndatabaseType;51 }52

53 public voidsetDatabaseType(String databaseType) {54 this.databaseType =databaseType;55 }56

57 publicString getConnectionType() {58 returnconnectionType;59 }60

61 public voidsetConnectionType(String connectionType) {62 this.connectionType =connectionType;63 }64

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值