<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    GalaxyPilot —— D.S


            生命不熄,戰斗不止
    數據加載中……

    java調用kettle4.2數據庫型資料庫中的作業

    import org.pentaho.di.core.KettleEnvironment;
    import org.pentaho.di.core.database.DatabaseMeta;
    import org.pentaho.di.job.JobMeta;
    import org.pentaho.di.job.Job;
    import org.pentaho.di.repository.Repository;
    import org.pentaho.di.repository.RepositoryDirectoryInterface;
    import org.pentaho.di.repository.kdr.KettleDatabaseRepository;
    import org.pentaho.di.repository.kdr.KettleDatabaseRepositoryMeta;

    public class execRepositoryJobs {

        private static String jobName = "Job";

        public static void main(String[] args) {
            try {
                KettleEnvironment.init();

                KettleDatabaseRepository repository = new KettleDatabaseRepository();

                DatabaseMeta databaseMeta = new DatabaseMeta("repository", "MSSQL","Native", "192.169.0.146", "repository", "1433", "sa","sa");

                KettleDatabaseRepositoryMeta kettleDatabaseMeta = new KettleDatabaseRepositoryMeta("repository", "ERP", "Transformation description",databaseMeta);

                repository.init(kettleDatabaseMeta);

                repository.connect("admin", "admin");

                RepositoryDirectoryInterface directory = repository.loadRepositoryDirectoryTree();
                
                JobMeta jobMeta = ((Repository) repository).loadJob(jobName, directory, null, null ) ;

    //            RepositoryDirectoryInterface fooBar = directory.findDirectory("/");
    //
    //            JobMeta jobMeta = repository.loadJob(repository.getJobId(jobName, fooBar), null);

                Job job = new Job(repository,jobMeta);
                
                job.start();
                
                job.waitUntilFinished();
                
                if (job.getErrors() > 0) {
                    throw new RuntimeException(
                            "There were errors during transformation execution.");
                }

            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    posted on 2012-07-30 14:33 舵手 閱讀(1521) 評論(1)  編輯  收藏

    評論

    # re: java調用kettle4.2數據庫型資料庫中的作業  回復  更多評論   

    這陣子跟kettle較勁了?
    2012-10-25 11:19 | klzz

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: EEUSS影院WWW在线观看免费 | 特级毛片全部免费播放a一级| 亚洲免费电影网站| 久久国产精品亚洲综合| 青青操免费在线视频| 亚洲中久无码永久在线观看同| 免费国产黄网站在线看| 亚洲国产精品13p| 一级毛片试看60分钟免费播放| 免费一级毛片在级播放| 国产精品亚洲精品日韩电影| 免费国产成人午夜电影| 国产成人高清亚洲一区91| 亚洲人成无码网WWW| 人妖系列免费网站观看| 亚洲精品狼友在线播放| 亚洲免费人成在线视频观看| 亚洲精品视频在线| 国产免费看JIZZ视频| 国产日本亚洲一区二区三区| 男女啪啪永久免费观看网站| 国产成人午夜精品免费视频| 中文字幕亚洲精品无码| 日本高清色本免费现在观看| 特级aaaaaaaaa毛片免费视频| 国产精品亚洲综合专区片高清久久久| h片在线观看免费| 亚洲AV本道一区二区三区四区| 1a级毛片免费观看| 亚洲人av高清无码| 亚洲精品成人区在线观看| 中文成人久久久久影院免费观看| 久久久久亚洲av无码专区喷水| 久久精品网站免费观看| 黄色毛片免费在线观看| 久久亚洲一区二区| 午夜老司机免费视频| 久久久久久久久久久免费精品| 亚洲欧洲中文日产| 免费观看四虎精品国产永久| 日韩免费电影网址|