当前位置: 首页>>代码示例>>Java>>正文


Java Repository.loadDatabaseMetaFromStepAttribute方法代码示例

本文整理汇总了Java中org.pentaho.di.repository.Repository.loadDatabaseMetaFromStepAttribute方法的典型用法代码示例。如果您正苦于以下问题:Java Repository.loadDatabaseMetaFromStepAttribute方法的具体用法?Java Repository.loadDatabaseMetaFromStepAttribute怎么用?Java Repository.loadDatabaseMetaFromStepAttribute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.repository.Repository的用法示例。


在下文中一共展示了Repository.loadDatabaseMetaFromStepAttribute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException {
	try
	{
		databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
		rowLimit         = (int)rep.getStepAttributeInteger(id_step, "rowlimit"); //$NON-NLS-1$
		sql              =      rep.getStepAttributeString (id_step, "sql");  //$NON-NLS-1$
		outerJoin       =      rep.getStepAttributeBoolean(id_step, "outer_join");  //$NON-NLS-1$
		replacevars       =      rep.getStepAttributeBoolean(id_step, "replace_vars"); 
		sqlfieldname         =      rep.getStepAttributeString (id_step, "sql_fieldname");  //$NON-NLS-1$
		queryonlyonchange    =      rep.getStepAttributeBoolean (id_step, "query_only_on_change");  //$NON-NLS-1$	
	}
	catch(Exception e)
	{
		throw new KettleException(BaseMessages.getString(PKG, "DynamicSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo"), e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:DynamicSQLRowMeta.java

示例2: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
{
	try
	{
		databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);  //$NON-NLS-1$
		
		sql                       =      rep.getStepAttributeString (id_step, "sql");
		rowLimit = rep.getStepAttributeString(id_step, "limit");
		if (rowLimit==null) {
			rowLimit = Long.toString( rep.getStepAttributeInteger(id_step, "limit") );
		}

        String lookupFromStepname =  rep.getStepAttributeString (id_step, "lookup"); //$NON-NLS-1$
        StreamInterface infoStream = getStepIOMeta().getInfoStreams().get(0);
        infoStream.setSubject(lookupFromStepname);

           executeEachInputRow       =      rep.getStepAttributeBoolean(id_step, "execute_each_row");
           variableReplacementActive =      rep.getStepAttributeBoolean(id_step, "variables_active");
           lazyConversionActive      =      rep.getStepAttributeBoolean(id_step, "lazy_conversion_active");
	}
	catch(Exception e)
	{
		throw new KettleException("Unexpected error reading step information from the repository", e);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:TableInputMeta.java

示例3: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
	throws KettleException
{
	try
	{
		databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
		
		sql                       =      rep.getStepAttributeString (id_step, "sql");
		catalog                   =      rep.getStepAttributeString(id_step, "catalog");
           variableReplacementActive =      rep.getStepAttributeBoolean(id_step, "variables_active");
	}
	catch(Exception e)
	{
		throw new KettleException("Unexpected error reading step information from the repository", e);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:MondrianInputMeta.java

示例4: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
{
	try
	{
		database = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
           tablename = rep.getStepAttributeString(id_step, "tablename");
           schemaname = rep.getStepAttributeString(id_step, "schemaname");
           istablenameInfield =  rep.getStepAttributeBoolean(id_step, "istablenameInfield");
           tablenamefield = rep.getStepAttributeString(id_step, "tablenamefield"); //$NON-NLS-1$
           columnnamefield = rep.getStepAttributeString(id_step, "columnnamefield"); //$NON-NLS-1$
           resultfieldname = rep.getStepAttributeString(id_step, "resultfieldname"); //$NON-NLS-1$
       }
       catch (Exception e)
       {
           throw new KettleException(BaseMessages.getString(PKG, "ColumnExistsMeta.Exception.UnexpectedErrorReadingStepInfo"), e); //$NON-NLS-1$
       }
   }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:18,代码来源:ColumnExistsMeta.java

示例5: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) 
throws KettleException {
	try
	{
		database = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
		schemaname = rep.getStepAttributeString(id_step, "schemaname");
		tablenamefieldname = rep.getStepAttributeString(id_step, "tablenamefieldname"); //$NON-NLS-1$
           objecttypefieldname = rep.getStepAttributeString(id_step, "objecttypefieldname");
           sqlcreationfieldname = rep.getStepAttributeString(id_step, "sqlcreationfieldname");
           
           issystemobjectfieldname = rep.getStepAttributeString(id_step, "issystemobjectfieldname");
           includeCatalog = rep.getStepAttributeBoolean(id_step, "includeCatalog"); 
           includeSchema = rep.getStepAttributeBoolean(id_step, "includeSchema"); 
           includeTable = rep.getStepAttributeBoolean(id_step, "includeTable"); 
           includeView = rep.getStepAttributeBoolean(id_step, "includeView");
           includeProcedure = rep.getStepAttributeBoolean(id_step, "includeProcedure");
           includeSynonym = rep.getStepAttributeBoolean(id_step, "includeSynonym");
           addSchemaInOutput = rep.getStepAttributeBoolean(id_step, "addSchemaInOutput");
           dynamicSchema = rep.getStepAttributeBoolean(id_step, "dynamicSchema");
           schenameNameField = rep.getStepAttributeString(id_step, "schenameNameField");
       }
       catch (Exception e)
       {
           throw new KettleException(BaseMessages.getString(PKG, "GetTableNamesMeta.Exception.UnexpectedErrorReadingStepInfo"), e); //$NON-NLS-1$
       }
   }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:GetTableNamesMeta.java

示例6: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
{
   	try
   	{
		database = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);  //$NON-NLS-1$
           tablenamefield = rep.getStepAttributeString(id_step, "tablenamefield"); //$NON-NLS-1$
           schemaname = rep.getStepAttributeString(id_step, "schemaname");
           
           resultfieldname = rep.getStepAttributeString(id_step, "resultfieldname"); //$NON-NLS-1$
       }
       catch (Exception e)
       {
           throw new KettleException(BaseMessages.getString(PKG, "TableExistsMeta.Exception.UnexpectedErrorReadingStepInfo"), e); //$NON-NLS-1$
       }
   }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:16,代码来源:TableExistsMeta.java

示例7: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
	throws KettleException
{
	try
	{
		databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
		
		commitSize     = (int)rep.getStepAttributeInteger(id_step, "commit"); //$NON-NLS-1$
           schemaName     =      rep.getStepAttributeString(id_step, "schema"); //$NON-NLS-1$
		tableName      =      rep.getStepAttributeString(id_step, "table"); //$NON-NLS-1$
		updateBypassed =      rep.getStepAttributeBoolean(id_step, "update_bypassed"); //$NON-NLS-1$

		int nrkeys   = rep.countNrStepAttributes(id_step, "key_field"); //$NON-NLS-1$
		int nrvalues = rep.countNrStepAttributes(id_step, "value_name"); //$NON-NLS-1$
		
		allocate(nrkeys, nrvalues);
		
		for (int i=0;i<nrkeys;i++)
		{
			keyStream[i]    = rep.getStepAttributeString(id_step, i, "key_name"); //$NON-NLS-1$
			keyLookup[i]    = rep.getStepAttributeString(id_step, i, "key_field"); //$NON-NLS-1$
			keyCondition[i] = rep.getStepAttributeString(id_step, i, "key_condition"); //$NON-NLS-1$
			keyStream2[i]   = rep.getStepAttributeString(id_step, i, "key_name2"); //$NON-NLS-1$
		}
		
		for (int i=0;i<nrvalues;i++)
		{
			updateLookup[i]  = rep.getStepAttributeString(id_step, i, "value_name"); //$NON-NLS-1$
			updateStream[i]  = rep.getStepAttributeString(id_step, i, "value_rename"); //$NON-NLS-1$
			update[i]        = Boolean.valueOf(rep.getStepAttributeBoolean(id_step, i, "value_update",true)); //$NON-NLS-1$
		}
	}
	catch(Exception e)
	{
		throw new KettleException(BaseMessages.getString(PKG, "InsertUpdateMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository"), e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:38,代码来源:InsertUpdateMeta.java

示例8: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
	throws KettleException
{
		try
		{
			databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
            schemaName       =      rep.getStepAttributeString (id_step, "schema");
			tablename        =      rep.getStepAttributeString (id_step, "table");
			truncateTable    =      rep.getStepAttributeBoolean(id_step, "truncate"); 
			createTable    =      rep.getStepAttributeBoolean(id_step, "create");
			encoding        =      rep.getStepAttributeString (id_step, "encoding");
			dateformat       =      rep.getStepAttributeString (id_step, "dateformat");
			AddToResult     =      rep.getStepAttributeBoolean(id_step, "addtoresult"); 
			StartNewLine     =      rep.getStepAttributeBoolean(id_step, "startnewline");
			
			fileName        =      rep.getStepAttributeString (id_step, "file_name");    
			extension       =      rep.getStepAttributeString (id_step, "file_extention");
			fileAppended          =      rep.getStepAttributeBoolean(id_step, "file_append");
			splitEvery      = (int)rep.getStepAttributeInteger(id_step, "file_split");
			stepNrInFilename      =      rep.getStepAttributeBoolean(id_step, "file_add_stepnr");
			partNrInFilename      =      rep.getStepAttributeBoolean(id_step, "file_add_partnr");
			dateInFilename        =      rep.getStepAttributeBoolean(id_step, "file_add_date");
			timeInFilename        =      rep.getStepAttributeBoolean(id_step, "file_add_time");
			createparentfolder        =      rep.getStepAttributeBoolean(id_step, "create_parent_folder");
			DoNotOpenNewFileInit          =      rep.getStepAttributeBoolean(id_step, "DoNotOpenNewFileInit");
			
			
			
			

		}
		catch(Exception e)
		{
			throw new KettleException("Unexpected error reading step information from the repository", e);
		}
	}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:37,代码来源:SQLFileOutputMeta.java

示例9: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
	throws KettleException
{
	try
	{
		databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);  //$NON-NLS-1$
           schemaName     =      rep.getStepAttributeString(id_step,  "schema");         //$NON-NLS-1$
		tableName      =      rep.getStepAttributeString(id_step,  "table");          //$NON-NLS-1$
		encoding       =      rep.getStepAttributeString(id_step,  "encoding");       //$NON-NLS-1$
		enclosure      =      rep.getStepAttributeString(id_step,  "enclosure");       //$NON-NLS-1$
		delimiter      =      rep.getStepAttributeString(id_step,  "delimiter");       //$NON-NLS-1$
		escapeChar     =      rep.getStepAttributeString(id_step,  "escape_char");       //$NON-NLS-1$
		fifoFileName   =      rep.getStepAttributeString(id_step,  "fifo_file_name");       //$NON-NLS-1$
		replacingData  =      rep.getStepAttributeBoolean(id_step, "replace");       //$NON-NLS-1$
		ignoringErrors =      rep.getStepAttributeBoolean(id_step, "ignore");       //$NON-NLS-1$
     localFile      =      rep.getStepAttributeBoolean(id_step, "local");       //$NON-NLS-1$
		bulkSize       =      rep.getStepAttributeString(id_step,  "bulk_size");       //$NON-NLS-1$
		
		int nrvalues = rep.countNrStepAttributes(id_step, "stream_name");             //$NON-NLS-1$

		allocate(nrvalues);

		for (int i=0;i<nrvalues;i++)
		{
			fieldTable[i]  = rep.getStepAttributeString(id_step, i, "stream_name");   //$NON-NLS-1$
			fieldStream[i] = rep.getStepAttributeString(id_step, i, "field_name");    //$NON-NLS-1$
			if (fieldStream[i]==null) fieldStream[i]=fieldTable[i];        
			fieldFormatType[i] = getFieldFormatType(rep.getStepAttributeString(id_step, i, "field_format_type"));    //$NON-NLS-1$
		}
	}
	catch(Exception e)
	{
		throw new KettleException(BaseMessages.getString(PKG, "MySQLBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository"), e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:36,代码来源:MySQLBulkLoaderMeta.java

示例10: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
	throws KettleException
{
	try
	{
		databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);  //$NON-NLS-1$
           schemaName     =      rep.getStepAttributeString(id_step,  "schema");         //$NON-NLS-1$
		tableName      =      rep.getStepAttributeString(id_step,  "table");          //$NON-NLS-1$
		loadAction     =      rep.getStepAttributeString(id_step,  "load_action");    //$NON-NLS-1$
		PsqlPath         =      rep.getStepAttributeString(id_step,  "PsqlPath");         //$NON-NLS-1$

		dbNameOverride =      rep.getStepAttributeString(id_step,  "dbname_override");//$NON-NLS-1$			
        enclosure = rep.getStepAttributeString(id_step, "enclosure");//$NON-NLS-1$
        delimiter = rep.getStepAttributeString(id_step, "delimiter");//$NON-NLS-1$

		int nrvalues = rep.countNrStepAttributes(id_step, "stream_name");             //$NON-NLS-1$

		allocate(nrvalues);

		for (int i=0;i<nrvalues;i++)
		{
			fieldTable[i]  = rep.getStepAttributeString(id_step, i, "stream_name");   //$NON-NLS-1$
			fieldStream[i] = rep.getStepAttributeString(id_step, i, "field_name");    //$NON-NLS-1$
			dateMask[i]    = rep.getStepAttributeString(id_step, i, "date_mask");     //$NON-NLS-1$
		}
	}
	catch(Exception e)
	{
		throw new KettleException(BaseMessages.getString(PKG, "GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository"), e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:32,代码来源:PGBulkLoaderMeta.java

示例11: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
	throws KettleException
{
	try
	{
		databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);

		commitSize     = (int)rep.getStepAttributeInteger(id_step, "commit"); //$NON-NLS-1$
           schemaName     =      rep.getStepAttributeString(id_step,  "schema"); //$NON-NLS-1$
		tableName      =      rep.getStepAttributeString(id_step,  "table"); //$NON-NLS-1$
           
		int nrkeys   = rep.countNrStepAttributes(id_step, "key_name"); //$NON-NLS-1$
		
		allocate(nrkeys);
		
		for (int i=0;i<nrkeys;i++)
		{
			keyStream[i]    = rep.getStepAttributeString(id_step, i, "key_name"); //$NON-NLS-1$
			keyLookup[i]    = rep.getStepAttributeString(id_step, i, "key_field"); //$NON-NLS-1$
			keyCondition[i] = rep.getStepAttributeString(id_step, i, "key_condition"); //$NON-NLS-1$
			keyStream2[i]   = rep.getStepAttributeString(id_step, i, "key_name2"); //$NON-NLS-1$
		}
	}
	catch(Exception e)
	{
		throw new KettleException(BaseMessages.getString(PKG, "DeleteMeta.Exception.UnexpectedErrorInReadingStepInfo"), e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:29,代码来源:DeleteMeta.java

示例12: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
	throws KettleException
{
	try
	{
		databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);  //$NON-NLS-1$
		skipLookup =     rep.getStepAttributeBoolean (id_step, "skip_lookup");
		commitSize     = (int)rep.getStepAttributeInteger(id_step, "commit"); //$NON-NLS-1$
           useBatchUpdate   =      rep.getStepAttributeBoolean(id_step, "use_batch"); 
           schemaName     =      rep.getStepAttributeString(id_step, "schema"); //$NON-NLS-1$
		tableName      =      rep.getStepAttributeString(id_step, "table"); //$NON-NLS-1$
           
           errorIgnored    =     rep.getStepAttributeBoolean(id_step, "error_ignored"); //$NON-NLS-1$
           ignoreFlagField =     rep.getStepAttributeString (id_step, "ignore_flag_field"); //$NON-NLS-1$

		int nrkeys   = rep.countNrStepAttributes(id_step, "key_name"); //$NON-NLS-1$
		int nrvalues = rep.countNrStepAttributes(id_step, "value_name"); //$NON-NLS-1$
		
		allocate(nrkeys, nrvalues);
		
		for (int i=0;i<nrkeys;i++)
		{
			keyStream[i]          = rep.getStepAttributeString(id_step, i, "key_name"); //$NON-NLS-1$
			keyLookup[i]    = rep.getStepAttributeString(id_step, i, "key_field"); //$NON-NLS-1$
			keyCondition[i] = rep.getStepAttributeString(id_step, i, "key_condition"); //$NON-NLS-1$
			keyStream2[i]         = rep.getStepAttributeString(id_step, i, "key_name2"); //$NON-NLS-1$
		}
		
		for (int i=0;i<nrvalues;i++)
		{
			updateLookup[i]        = rep.getStepAttributeString(id_step, i, "value_name"); //$NON-NLS-1$
			updateStream[i]    = rep.getStepAttributeString(id_step, i, "value_rename"); //$NON-NLS-1$
		}
	}
	catch(Exception e)
	{
		throw new KettleException(BaseMessages.getString(PKG, "UpdateMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository"), e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:40,代码来源:UpdateMeta.java

示例13: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
	throws KettleException
{
	try
	{
		databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
    		maxErrors      = (int)rep.getStepAttributeInteger(id_step, "errors");         //$NON-NLS-1$
           schemaName     =      rep.getStepAttributeString(id_step,  "schema");         //$NON-NLS-1$
		tableName      =      rep.getStepAttributeString(id_step,  "table");          //$NON-NLS-1$
		loadMethod     =      rep.getStepAttributeString(id_step,  "load_method");    //$NON-NLS-1$
		loadAction     =      rep.getStepAttributeString(id_step,  "load_action");    //$NON-NLS-1$
		PsqlPath         =      rep.getStepAttributeString(id_step,  "PsqlPath");         //$NON-NLS-1$
		controlFile    =      rep.getStepAttributeString(id_step,  "control_file");   //$NON-NLS-1$
		dataFile       =      rep.getStepAttributeString(id_step,  "data_file");      //$NON-NLS-1$
		logFile        =      rep.getStepAttributeString(id_step,  "log_file");       //$NON-NLS-1$

		eraseFiles     =      rep.getStepAttributeBoolean(id_step, "erase_files");    //$NON-NLS-1$
		encoding       =      rep.getStepAttributeString(id_step,  "encoding");       //$NON-NLS-1$
		dbNameOverride =      rep.getStepAttributeString(id_step,  "dbname_override");//$NON-NLS-1$			
		
		int nrvalues = rep.countNrStepAttributes(id_step, "stream_name");             //$NON-NLS-1$

		allocate(nrvalues);

		for (int i=0;i<nrvalues;i++)
		{
			fieldTable[i]  = rep.getStepAttributeString(id_step, i, "stream_name");   //$NON-NLS-1$
			fieldStream[i] = rep.getStepAttributeString(id_step, i, "field_name");    //$NON-NLS-1$
			dateMask[i]    = rep.getStepAttributeString(id_step, i, "date_mask");     //$NON-NLS-1$
		}
	}
	catch(Exception e)
	{
		throw new KettleException(BaseMessages.getString(PKG, "GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository"), e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:37,代码来源:GPBulkLoaderMeta.java

示例14: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
{
    try
    {
        databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);  //$NON-NLS-1$
        tablename    = rep.getStepAttributeString (id_step, "table");
        fifoFileName = rep.getStepAttributeString(id_step,  "fifo_file_name");       //$NON-NLS-1$
        sqlPath      = rep.getStepAttributeString(id_step,  "sql_path");         //$NON-NLS-1$
        encoding     = rep.getStepAttributeString(id_step,  "encoding");       //$NON-NLS-1$
        delimiter    = rep.getStepAttributeString(id_step,  "delimiter");       //$NON-NLS-1$
        continueOnError = rep.getStepAttributeBoolean(id_step,  "continue_on_error");       //$NON-NLS-1$
        errorFileName   = rep.getStepAttributeString(id_step,  "error_file_name");       //$NON-NLS-1$
        useStandardConversion = rep.getStepAttributeBoolean(id_step,  "use_standard_conversion");       //$NON-NLS-1$
        useDynamicVNode = rep.getStepAttributeBoolean(id_step,  "use_dynamic_vnode");       //$NON-NLS-1$
        useSSV = rep.getStepAttributeBoolean(id_step,  "use_SSV_delimiter");       //$NON-NLS-1$

        int nrCols    = rep.countNrStepAttributes(id_step, "column_name"); //$NON-NLS-1$
        int nrStreams = rep.countNrStepAttributes(id_step, "stream_name"); //$NON-NLS-1$
        
        int nrRows = (nrCols < nrStreams ? nrStreams : nrCols);
        allocate(nrRows);
        
        for (int idx=0; idx < nrRows; idx++)
        {
            fieldDatabase[idx] = Const.NVL(rep.getStepAttributeString(id_step, idx, "column_name"), ""); //$NON-NLS-1$ //$NON-NLS-2$
            fieldStream[idx]   = Const.NVL(rep.getStepAttributeString(id_step, idx, "stream_name"), ""); //$NON-NLS-1$ //$NON-NLS-2$
        }
    }
    catch(Exception e)
    {
        throw new KettleException("Unexpected error reading step information from the repository", e);
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:34,代码来源:IngresVectorwiseLoaderMeta.java

示例15: readRep

import org.pentaho.di.repository.Repository; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
		throws KettleException
{
	try
	{
		databaseMeta = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
		executedEachInputRow = rep.getStepAttributeBoolean(id_step, "execute_each_row"); //$NON-NLS-1$
		singleStatement = rep.getStepAttributeBoolean(id_step, "single_statement"); //$NON-NLS-1$
		replaceVariables = rep.getStepAttributeBoolean(id_step, "replace_variables"); //$NON-NLS-1$
		sql = rep.getStepAttributeString(id_step, "sql"); //$NON-NLS-1$

		insertField = rep.getStepAttributeString(id_step, "insert_field"); //$NON-NLS-1$
		updateField = rep.getStepAttributeString(id_step, "update_field"); //$NON-NLS-1$
		deleteField = rep.getStepAttributeString(id_step, "delete_field"); //$NON-NLS-1$
		readField = rep.getStepAttributeString(id_step, "read_field"); //$NON-NLS-1$

		int nrargs = rep.countNrStepAttributes(id_step, "arg_name"); //$NON-NLS-1$
		allocate(nrargs);

		for (int i = 0; i < nrargs; i++)
		{
			arguments[i] = rep.getStepAttributeString(id_step, i, "arg_name"); //$NON-NLS-1$
		}
	} catch (Exception e)
	{
		throw new KettleException(BaseMessages.getString(PKG, "ExecSQLMeta.Exception.UnexpectedErrorReadingStepInfo"), e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:29,代码来源:ExecSQLMeta.java


注:本文中的org.pentaho.di.repository.Repository.loadDatabaseMetaFromStepAttribute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。