本文整理汇总了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"));
}
}
示例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);
}
}
示例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;
}
}
示例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$
}
}
示例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$
}
}
示例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);
}
}
示例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 );
}
}
示例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$
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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 ) );
}
}
示例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);
}
}
}
示例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() ;
}
}