當前位置: 首頁>>代碼示例>>Java>>正文


Java Repository.countNrStepAttributes方法代碼示例

本文整理匯總了Java中org.pentaho.di.repository.Repository.countNrStepAttributes方法的典型用法代碼示例。如果您正苦於以下問題:Java Repository.countNrStepAttributes方法的具體用法?Java Repository.countNrStepAttributes怎麽用?Java Repository.countNrStepAttributes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.pentaho.di.repository.Repository的用法示例。


在下文中一共展示了Repository.countNrStepAttributes方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: readRep

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override public void readRep(Repository rep, IMetaStore metaStore, ObjectId id_step,
    List<DatabaseMeta> databases) throws KettleException {
    super.readRep(rep, metaStore, id_step, databases);

    String truncateStr = rep.getStepAttributeString(id_step, "truncate");
    if (truncateStr.equals("true")) {
        setTruncate(true);
    } else {
        setTruncate(false);
    }

    int nrStreamFields = rep.countNrStepAttributes(id_step, "stream_field_name");
    streamFields = new ArrayList<String>(nrStreamFields);
    for (int i = 0; i < nrStreamFields; i++) {
        streamFields.add(rep.getStepAttributeString(id_step, i, "stream_field_name"));
    }
}
 
開發者ID:aliyun,項目名稱:aliyun-maxcompute-data-collectors,代碼行數:18,代碼來源:OdpsOutputMeta.java

示例2: readRep

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override public void readRep(Repository rep, IMetaStore metaStore, ObjectId id_step,
    List<DatabaseMeta> databases) throws KettleException {
    setEndpoint(rep.getStepAttributeString(id_step, "endpoint"));
    setTunnelEndpoint(rep.getStepAttributeString(id_step, "tunnelEndpoint"));
    setAccessId(rep.getStepAttributeString(id_step, "accessId"));
    setAccessKey(rep.getStepAttributeString(id_step, "accessKey"));
    setProjectName(rep.getStepAttributeString(id_step, "projectName"));
    setTableName(rep.getStepAttributeString(id_step, "tableName"));
    setPartition(rep.getStepAttributeString(id_step, "partition"));

    int nrFields = rep.countNrStepAttributes(id_step, "field_name");
    odpsFields = new ArrayList<OdpsField>(nrFields);
    for (int i = 0; i < nrFields; i++) {
        OdpsField field = new OdpsField();
        field.setName(rep.getStepAttributeString(id_step, i, "field_name"));
        field.setType(rep.getStepAttributeString(id_step, i, "field_type"));
        field.setComment(rep.getStepAttributeString(id_step, i, "field_comment"));
        odpsFields.add(field);
    }
}
 
開發者ID:aliyun,項目名稱:aliyun-maxcompute-data-collectors,代碼行數:21,代碼來源:OdpsMeta.java

示例3: readFieldsFromRepository

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
private void readFieldsFromRepository( Repository rep, ObjectId id_step ) throws KettleException {
  int nrFields = rep.countNrStepAttributes( id_step, "trim_type" );
  allocateFields( nrFields );

  for ( int i = 0; i < nrFields; i++ ) {
    SdmxInputField field = new SdmxInputField();

    field.setName( rep.getStepAttributeString( id_step, i, "name" ) );
    field.setType( rep.getStepAttributeString( id_step, i, "type" ) );
    field.setLength( (int) rep.getStepAttributeInteger( id_step, i,  "length" ) );
    field.setPrecision( (int) rep.getStepAttributeInteger( id_step, i,  "precision" ) );
    field.setTrimType( ValueMetaBase.getTrimTypeByCode( rep.getStepAttributeString( id_step, i, "trim_type" ) ) );
    field.setFormat( rep.getStepAttributeString( id_step, i, "format" ) );
    field.setCurrencySymbol( rep.getStepAttributeString( id_step, i, "currency" ) );
    field.setDecimalSymbol( rep.getStepAttributeString( id_step, i, "decimal" ) );
    field.setGroupSymbol( rep.getStepAttributeString( id_step, i, "group" ) );

    String srepeat = rep.getStepAttributeString( id_step, i, "repeat" );
    if ( srepeat != null ) {
      field.setRepeated( YES.equalsIgnoreCase( srepeat ) );
    } else {
      field.setRepeated( false );
    }
    fields[i] = field;
  }
}
 
開發者ID:andtorg,項目名稱:sdmx-kettle,代碼行數:27,代碼來源:SdmxStepMeta.java

示例4: readRep

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public void readRep(Repository rep, long id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException {

    	try
        {
            fieldName = rep.getStepAttributeString(id_step, "field_name"); //$NON-NLS-1$

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

            allocate(nrvalues);

            for (int i = 0; i < nrvalues; i++)
            {
                targetField[i] = rep.getStepAttributeString(id_step, i, "target_field"); //$NON-NLS-1$
            }
        }
        catch (Exception e)
        {
            throw new KettleException(Messages.getString("FlattenerMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepository"), e); //$NON-NLS-1$
        }
    }
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:21,代碼來源:FlattenerMeta.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
	{
		int nrfields = rep.countNrStepAttributes(id_step, "field_name"); //$NON-NLS-1$
		
		allocate(nrfields);

		for (int i=0;i<nrfields;i++)
		{
			fieldName[i] =          rep.getStepAttributeString(id_step, i, "field_name"); //$NON-NLS-1$
			variableName[i] = 		rep.getStepAttributeString(id_step, i, "variable_name"); //$NON-NLS-1$
               variableType[i] = getVariableType(rep.getStepAttributeString(id_step, i, "variable_type")); //$NON-NLS-1$
               defaultValue[i] = 		rep.getStepAttributeString(id_step, i, "default_value");
		}
		
		usingFormatting = rep.getStepAttributeBoolean(id_step, 0, "use_formatting", false); //$NON-NLS-1$
	}
	catch(Exception e)
	{
		throw new KettleException(BaseMessages.getString(PKG, "SetVariableMeta.RuntimeError.UnableToReadRepository.SETVARIABLE0005"), e); //$NON-NLS-1$
	}
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:25,代碼來源:SetVariableMeta.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
       {
       	usevar  = rep.getStepAttributeBoolean(id_step, "usevar");
           int nrfields = rep.countNrStepAttributes(id_step, "field_name");
           allocate(nrfields);
          
           for (int i = 0; i < nrfields; i++)
           {
               fieldName[i] = rep.getStepAttributeString(id_step, i, "field_name");
               replaceValue[i] = rep.getStepAttributeString(id_step, i, "replace_value");
               replaceMask[i] = rep.getStepAttributeString(id_step, i, "replace_mask");
           }
       }
       catch (Exception e)
       {
           throw new KettleException("Unexpected error reading step information from the repository", e);
       }
   }
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:21,代碼來源:SetValueConstantMeta.java

示例7: readRep

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
  throws KettleException {
  try {
    this.keyFieldName = rep.getStepAttributeString( id_step, "keyfield" );
    this.valueFieldName = rep.getStepAttributeString( id_step, "valuefield" );
    this.expirationTime = (int) rep.getStepAttributeInteger( id_step, "expiration" );

    int nrservers = rep.countNrStepAttributes( id_step, "server" );

    allocate( nrservers );

    for ( int i = 0; i < nrservers; i++ ) {
      servers.add( new InetSocketAddress( rep.getStepAttributeString( id_step, i, "hostname" ), Integer.parseInt( rep
          .getStepAttributeString( id_step, i, "port" ) ) ) );
    }

  } catch ( Exception e ) {
    throw new KettleException( BaseMessages.getString( PKG,
        "MemcachedOutputMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
  }
}
 
開發者ID:mattyb149,項目名稱:pdi-memcached-plugin,代碼行數:22,代碼來源:MemcachedOutputMeta.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
     {
database = rep.loadDatabaseMetaFromStepAttribute(id_step, "id_connection", databases);
         procedure = rep.getStepAttributeString(id_step, "procedure"); //$NON-NLS-1$

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

         for (int i = 0; i < nrargs; i++)
         {
             argument[i] = rep.getStepAttributeString(id_step, i, "arg_name"); //$NON-NLS-1$
             argumentDirection[i] = rep.getStepAttributeString(id_step, i, "arg_direction"); //$NON-NLS-1$
             argumentType[i] = ValueMeta.getType(rep.getStepAttributeString(id_step, i, "arg_type")); //$NON-NLS-1$
         }

         resultName = rep.getStepAttributeString(id_step, "result_name"); //$NON-NLS-1$
         resultType = ValueMeta.getType(rep.getStepAttributeString(id_step, "result_type")); //$NON-NLS-1$
         autoCommit = rep.getStepAttributeBoolean(id_step, 0, "auto_commit", true);
     }
     catch (Exception e)
     {
         throw new KettleException(BaseMessages.getString(PKG, "DBProcMeta.Exception.UnexpectedErrorReadingStepInfo"), e); //$NON-NLS-1$
     }
 }
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:27,代碼來源:DBProcMeta.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 {
		int nrfields = rep.countNrStepAttributes(id_step, "cctype");

		allocate(nrfields);

		for (int i = 0; i < nrfields; i++) {
			fieldCCType[i] = rep.getStepAttributeString(id_step, i,"cctype");
			fieldCCLength[i] = rep.getStepAttributeString(id_step, i,"cclen");
			fieldCCSize[i] = rep.getStepAttributeString(id_step, i,"ccsize");
		}
           cardNumberFieldName = rep.getStepAttributeString(id_step, "cardNumberFieldName");
           cardLengthFieldName = rep.getStepAttributeString(id_step, "cardLengthFieldName");
           cardTypeFieldName = rep.getStepAttributeString(id_step, "cardTypeFieldName");

	} catch (Exception e) {
		throw new KettleException("Unexpected error reading step information from the repository", e);
	}
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:22,代碼來源:RandomCCNumberGeneratorMeta.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
    {
        int nrfields = rep.countNrStepAttributes(id_step, "field_name");

        allocate(nrfields);

        for (int i = 0; i < nrfields; i++)
        {
            fieldName[i] = rep.getStepAttributeString(id_step, i, "field_name");
            ascending[i] = rep.getStepAttributeBoolean(id_step, i, "field_ascending");
        }
    }
    catch (Exception e)
    {
        throw new KettleException("Unexpected error reading step information from the repository", e);
    }
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:20,代碼來源:SortedMergeMeta.java

示例11: readRep

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public void readRep(Repository rep, long id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
{
    try
    {
        int nrfields = rep.countNrStepAttributes(id_step, "field_name");

        allocate(nrfields);

        for (int i = 0; i < nrfields; i++)
        {
            fieldName[i] = rep.getStepAttributeString(id_step, i, "field_name");
            ascending[i] = rep.getStepAttributeBoolean(id_step, i, "field_ascending");
        }
    }
    catch (Exception e)
    {
        throw new KettleException("Unexpected error reading step information from the repository", e);
    }
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:20,代碼來源:SortedMergeMeta.java

示例12: readRep

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override
public void readRep(Repository rep, IMetaStore metastore, ObjectId id_step, List<DatabaseMeta> databases)
        throws KettleException {
    this.cassandraNodes = rep.getStepAttributeString(id_step, 0, CASSANDRA_NODES);
    this.cassandraPort = rep.getStepAttributeString(id_step, 0, CASSANDRA_PORT);
    this.username = rep.getStepAttributeString(id_step, 0, USERNAME);
    this.password = rep.getStepAttributeString(id_step, 0, PASSWORD);
    if (!Const.isEmpty(this.password)) {
        this.password = Encr.decryptPasswordOptionallyEncrypted(this.password);
    }
    this.keyspace = rep.getStepAttributeString(id_step, 0, CASSANDRA_KEYSPACE);
    this.SslEnabled = rep.getStepAttributeBoolean(id_step, 0, CASSANDRA_WITH_SSL);
    this.trustStoreFilePath = rep.getStepAttributeString(id_step, 0, CASSANDRA_TRUSTSTORE_FILE_PATH);
    this.trustStorePass = rep.getStepAttributeString(id_step, 0, CASSANDRA_TRUSTSTORE_PASS);
    if (!Const.isEmpty(this.trustStorePass)) {
        this.trustStorePass = Encr.decryptPasswordOptionallyEncrypted(this.trustStorePass);
    }
    this.columnfamily = rep.getStepAttributeString(id_step, 0, CASSANDRA_COLUMN_FAMILY);
    this.syncMode = rep.getStepAttributeBoolean(id_step, 0, SYNC_ENABLED);

    String batchSize = rep.getStepAttributeString(id_step, 0, BATCH_SIZE);
    this.batchSize = (Const.isEmpty(batchSize) ? 1000 : Integer.valueOf(batchSize));

    String sCompression = rep.getStepAttributeString(id_step, 0, QUERY_COMPRESSION);
    this.compression = (Const.isEmpty(sCompression) ? ConnectionCompression.SNAPPY : ConnectionCompression.fromString(sCompression));

    this.specifyFields = rep.getStepAttributeBoolean(id_step, 0, SPECIFY_FIELDS);

    int nrCols = rep.countNrStepAttributes(id_step, COLUMN_NAME);
    int nrStreams = rep.countNrStepAttributes(id_step, STREAM_NAME);
    int nrRows = nrCols < nrStreams ? nrStreams : nrCols;

    allocate(nrRows);
    for (int idx = 0; idx < nrRows; idx++) {
        this.cassandraFields[idx] = Const.NVL(rep.getStepAttributeString(id_step, idx, COLUMN_NAME), "");
        this.streamFields[idx] = Const.NVL(rep.getStepAttributeString(id_step, idx, STREAM_NAME), "");
    }

    this.ttl = Const.toInt(rep.getStepAttributeString(id_step, 0, TTL), 0);
}
 
開發者ID:bcolas,項目名稱:pentaho-cassandra-plugin,代碼行數:41,代碼來源:CassandraOutputMeta.java

示例13: readDimensionsFromRepository

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
private void readDimensionsFromRepository( Repository rep, ObjectId id_step ) throws KettleException {
  int nrDimensions = rep.countNrStepAttributes( id_step, "dim_id" );

  for ( int i = 0; i < nrDimensions; i++ ) {
    Dimension d = new Dimension();
    d.setId( rep.getStepAttributeString( id_step, i, "dim_id") );
    d.setPosition( Integer.parseInt( rep.getStepAttributeString( id_step, i, "dim_position" ) ) );
    String code = rep.getStepAttributeString( id_step, i, "dim_code" );

    dimensionToCodes.put( d, ( code == null ? "" : code ) );
  }
}
 
開發者ID:andtorg,項目名稱:sdmx-kettle,代碼行數:13,代碼來源:SdmxStepMeta.java

示例14: readRep

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
  throws KettleException {
   setHostname( rep.getStepAttributeString( id_step, "hostname" ) );
   setPort( rep.getStepAttributeString( id_step, "port" ) );
   setUserName( rep.getStepAttributeString( id_step, "sequoiadbusername" ) );
   setPwd( rep.getStepAttributeString( id_step, "sequoiadbpassword" ) );
   setCSName( rep.getStepAttributeString( id_step, "CSName" ) );
   setCLName( rep.getStepAttributeString( id_step, "CLName" ) );
   setQuery( rep.getStepAttributeString( id_step, "query" ) );
   setSelector( rep.getStepAttributeString( id_step, "selector" ) );
   setOrderby( rep.getStepAttributeString( id_step, "orderby" ) );
   setSkip( rep.getStepAttributeString( id_step, "skip" ) );
   setLimit( rep.getStepAttributeString( id_step, "limit" ) );

   int numFields = rep.countNrStepAttributes(id_step, "field_name");
   if(numFields > 0){
      m_fields = new ArrayList<SequoiaDBInputField>();
      for( int i = 0; i < numFields; i++){
         SequoiaDBInputField fieldTmp = new SequoiaDBInputField();
         fieldTmp.m_fieldName = rep.getStepAttributeString(id_step, i, "field_name");
         fieldTmp.m_path = rep.getStepAttributeString(id_step, i, "field_path");
         fieldTmp.m_kettleType = rep.getStepAttributeString(id_step, i, "field_type");
         m_fields.add(fieldTmp);
      }
   }
}
 
開發者ID:SequoiaDB,項目名稱:pentaho-sequoiadb-plugin,代碼行數:28,代碼來源:SequoiaDBInputMeta.java

示例15: readRep

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
@Override
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
  throws KettleException {
   setHostname( rep.getStepAttributeString( id_step, "hostname" ) );
   setPort( rep.getStepAttributeString( id_step, "port" ) );
   setUserName( rep.getStepAttributeString( id_step, "sequoiadbusername" ) );
   setPwd( rep.getStepAttributeString( id_step, "sequoiadbpassword" ) );
   setCSName( rep.getStepAttributeString( id_step, "CSName" ) );
   setCLName( rep.getStepAttributeString( id_step, "CLName" ) );
   setBulkInsertSize( rep.getStepAttributeString( id_step, "bulkinsertsize" ) );
   setTruncate( rep.getStepAttributeBoolean( id_step, "truncate" ) );
   setUpdate( rep.getStepAttributeBoolean( id_step, "update" ) );
   setUpsert( rep.getStepAttributeBoolean( id_step, "upsert" ) );

   int numFields = rep.countNrStepAttributes(id_step, "field_name");
   if(numFields > 0){
      m_fields = new SequoiaDBOutputRecordInfo();
      for( int i = 0; i < numFields; i++){
         SequoiaDBOutputFieldInfo fieldInfo
                  = new SequoiaDBOutputFieldInfo(rep.getStepAttributeString(id_step, i, "field_name"),
                                                 rep.getStepAttributeString(id_step, i, "field_path")) ;
         fieldInfo.setCond( rep.getStepAttributeBoolean(id_step, i, "field_cond") ) ;
         fieldInfo.setUpdateOp( rep.getStepAttributeString(id_step, i, "field_updateop") ) ;
         m_fields.addField( fieldInfo );
      }
      m_fields.done() ;
   }
}
 
開發者ID:SequoiaDB,項目名稱:pentaho-sequoiadb-plugin,代碼行數:29,代碼來源:SequoiaDBOutputMeta.java


注:本文中的org.pentaho.di.repository.Repository.countNrStepAttributes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。