• 大小: 73.67MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2022-09-07
  • 语言: 其他
  • 标签: etl  kettle  spoon  

资源简介

etl数据整合工具绿色版,kettle-spoon亲测可用

资源截图

代码片段和文件信息


import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;

import org.pentaho.di.core.Const;
import org.pentaho.di.core.NotePadmeta;
import org.pentaho.di.core.database.Database;
import org.pentaho.di.core.database.Databasemeta;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.logging.LogWriter;
import org.pentaho.di.core.util.EnvUtil;
import org.pentaho.di.trans.StepLoader;
import org.pentaho.di.trans.Trans;
import org.pentaho.di.trans.TransHopmeta;
import org.pentaho.di.trans.Transmeta;
import org.pentaho.di.trans.step.Stepmeta;
import org.pentaho.di.trans.step.StepmetaInterface;
import org.pentaho.di.trans.steps.selectvalues.SelectValuesmeta;
import org.pentaho.di.trans.steps.tableinput.TableInputmeta;
import org.pentaho.di.trans.steps.tableoutput.TableOutputmeta;



/**
 * Class created to demonstrate the creation of transformations on-the-fly.
 * 
 * @author Matt
 * 
 */
public class TransBuilder
{
    public static final String[] databasesxml = {
        “l version=\“1.0\“ encoding=\“UTF-8\“?>“ +
        ““ +
            “target“ +
            “localhost“ +
            “MSSQL“ +
            “Native“ +
            “se>testse>“ +
            “1433“ +
            “matt“ +
            “abcd“ +
          “

          
          “l version=\“1.0\“ encoding=\“UTF-8\“?>“ +
          ““ +
              “source“ +
              “localhost“ +
              “MYSQL“ +
              “Native“ +
              “se>testse>“ +
              “3306“ +
              “matt“ +
              “abcd“ +
            “
“  
    };

    /**
     * Creates a new Transformation using input parameters such as the tablename to read from.
     * @param transformationName The name of the transformation
     * @param sourceDatabaseName The name of the database to read from
     * @param sourceTableName The name of the table to read from
     * @param sourceFields The field names we want to read from the source table
     * @param targetDatabaseName The name of the target database
     * @param targetTableName The name of the target table we want to write to
     * @param targetFields The names of the fields in the target table (same number of fields as sourceFields)
     * @return A new transformation
     * @throws KettleException In the rare case something goes wrong
     */
    public static final Transmeta buildCopyTable(String transformationName String sourceDatabaseName String sourceTableName String[] sourceFields String targetDatabaseName String targetTableName String[] targetFields) throws KettleException
    {
        En

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2009-05-12 13:51  data-integration\
     文件         479  2009-05-12 12:49  data-integration\Kettle.l4j.ini
     目录           0  2009-05-12 12:50  data-integration\extra\
     文件        2562  2009-05-12 12:50  data-integration\extra\TransBuilder.bat
     文件       10734  2009-05-12 12:50  data-integration\extra\TransBuilder.java
     文件        6463  2009-05-12 12:50  data-integration\extra\TransBuilderFilter.java
     文件        1883  2009-05-12 12:49  data-integration\kitchen.sh
     文件        2661  2009-05-12 12:49  data-integration\spoon.png
     文件        2589  2009-05-12 12:49  data-integration\Pan.bat
     文件         341  2009-05-12 12:49  data-integration\README_UNIX_AS400.txt
     文件        4286  2009-05-12 12:49  data-integration\spoon.ico
     文件        2890  2009-05-12 12:49  data-integration\Carte.bat
     目录           0  2009-05-12 12:49  data-integration\simple-jndi\
     文件         697  2009-05-12 12:49  data-integration\simple-jndi\jdbc.properties
     文件        1873  2009-05-12 12:49  data-integration\Encr.bat
     文件         988  2009-05-12 12:49  data-integration\encr.sh
     目录           0  2009-05-12 12:49  data-integration\docs\
     目录           0  2009-05-12 12:49  data-integration\docs\Nederlands\
     目录           0  2009-05-12 12:49  data-integration\docs\Nederlands\welcome\
     目录           0  2009-05-12 12:49  data-integration\docs\Nederlands\welcome\images\
     文件        6325  2009-05-12 12:49  data-integration\docs\Nederlands\welcome\images\bg_banner.png
     文件         203  2009-05-12 12:49  data-integration\docs\Nederlands\welcome\images\bullet_green.png
     文件        3230  2009-05-12 12:49  data-integration\docs\Nederlands\welcome\images\pentaho_logo.png
     文件        1173  2009-05-12 12:49  data-integration\docs\Nederlands\welcome\images\styles-new.css
     文件        4794  2009-05-12 12:49  data-integration\docs\Nederlands\welcome\kettle_document_map.html
     目录           0  2009-05-12 12:49  data-integration\docs\it_IT\
     目录           0  2009-05-12 12:49  data-integration\docs\it_IT\welcome\
     目录           0  2009-05-12 12:49  data-integration\docs\it_IT\welcome\images\
     文件        6325  2009-05-12 12:49  data-integration\docs\it_IT\welcome\images\bg_banner.png
     文件         203  2009-05-12 12:49  data-integration\docs\it_IT\welcome\images\bullet_green.png
     文件        3230  2009-05-12 12:49  data-integration\docs\it_IT\welcome\images\pentaho_logo.png
............此处省略4420个文件信息

评论

共有 条评论