org.pentaho.di.repository.Repository.saveDatabaseMetaStepAttribute()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(24.2k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中org.pentaho.di.repository.Repository.saveDatabaseMetaStepAttribute方法的一些代码示例,展示了Repository.saveDatabaseMetaStepAttribute的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.saveDatabaseMetaStepAttribute方法的具体详情如下:
包路径:org.pentaho.di.repository.Repository
类名称:Repository
方法名:saveDatabaseMetaStepAttribute

Repository.saveDatabaseMetaStepAttribute介绍

[英]This method saves the object ID of the database object (if not null) in the step attributes
[中]此方法将数据库对象的对象ID(如果不是null)保存在步骤属性中

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void saveDatabaseMetaStepAttribute( ObjectId objectId, ObjectId objectId1, String s, DatabaseMeta databaseMeta ) throws KettleException {
 getDelegate().saveDatabaseMetaStepAttribute( objectId, objectId1, s, databaseMeta );
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep )
 throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( idTransformation, idStep, "connection", this.databaseMeta );
  rep.saveStepAttribute( idTransformation, idStep, "modelName", this.modelName );
  rep.saveStepAttribute( idTransformation, idStep, "readBatchSize", this.commitBatchSize );
  rep.saveStepAttribute( idTransformation, idStep, "idFieldName", this.idFieldName );
 } catch ( Exception e ) {
  throw new KettleException( "Unable to save step information to the repository for idStep=" + idStep, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep )
 throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( idTransformation, idStep, "connection", databaseMeta );
  rep.saveStepAttribute( idTransformation, idStep, "dimension", this.dimension );
  rep.saveStepAttribute( idTransformation, idStep, "baseElementsOnly", this.baseElementsOnly );
  for ( int i = 0; i < levels.size(); i++ ) {
   rep.saveStepAttribute( idTransformation, idStep, i, "levelname", this.levels.get( i ).getLevelName() );
   rep.saveStepAttribute( idTransformation, idStep, i, "levelnumber", this.levels.get( i ).getLevelNumber() );
   rep.saveStepAttribute( idTransformation, idStep, i, "fieldname", this.levels.get( i ).getFieldName() );
   rep.saveStepAttribute( idTransformation, idStep, i, "fieldtype", this.levels.get( i ).getFieldType() );
  }
 } catch ( Exception e ) {
  throw new KettleException( "Unable to save step information to the repository for idStep=" + idStep, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep )
 throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( idTransformation, idStep, "connection", this.databaseMeta );
  rep.saveStepAttribute( idTransformation, idStep, "modelName", this.modelName );
  rep.saveStepAttribute( idTransformation, idStep, "readBatchSize", this.commitBatchSize );
  rep.saveStepAttribute( idTransformation, idStep, "outputIDField", this.outputIDField );
  rep.saveStepAttribute( idTransformation, idStep, "outputIDFieldName", this.outputIDFieldName );
  for ( int i = 0; i < modelFields.length; i++ ) {
   rep.saveStepAttribute( idTransformation, idStep, i, "model_field", modelFields[i] );
   rep.saveStepAttribute( idTransformation, idStep, i, "stream_field", streamFields[i] );
  }
  for ( int i = 0; i < keyLookups.size(); i++ ) {
   rep.saveStepAttribute( idTransformation, idStep, i, "model_key_field", keyLookups.get( i )[0] );
   rep.saveStepAttribute( idTransformation, idStep, i, "comparitor", keyLookups.get( i )[1] );
   rep.saveStepAttribute( idTransformation, idStep, i, "stream_key_field", keyLookups.get( i )[2] );
  }
 } catch ( Exception e ) {
  throw new KettleException( "Unable to save step information to the repository for idStep=" + idStep, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep )
 throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( idTransformation, idStep, "connection", databaseMeta );
  rep.saveStepAttribute( idTransformation, idStep, "cube", this.cube );
  rep.saveStepAttribute( idTransformation, idStep, "cubemeasurename", this.cubeMeasure.getFieldName() );
  rep.saveStepAttribute( idTransformation, idStep, "cubemeasuretype", this.cubeMeasure.getFieldType() );
  for ( int i = 0; i < this.fields.size(); i++ ) {
   rep.saveStepAttribute( idTransformation, idStep, i, "dimensionname", this.fields.get( i ).getDimensionName() );
   rep.saveStepAttribute( idTransformation, idStep, i, "fieldname", this.fields.get( i ).getFieldName() );
   rep.saveStepAttribute( idTransformation, idStep, i, "fieldtype", this.fields.get( i ).getFieldType() );
  }
 } catch ( Exception e ) {
  throw new KettleException( "Unable to save step information to the repository for idStep=" + idStep, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", database );
  rep.saveStepAttribute( id_transformation, id_step, "tablenamefield", tablenamefield );
  rep.saveStepAttribute( id_transformation, id_step, "schemaname", schemaname );
  rep.saveStepAttribute( id_transformation, id_step, "resultfieldname", resultfieldname );
  // Also, save the step-database relationship!
  if ( database != null ) {
   rep.insertStepDatabase( id_transformation, id_step, database.getObjectId() );
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString( PKG, "TableExistsMeta.Exception.UnableToSaveStepInfo" )
   + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep )
 throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( idTransformation, idStep, "connection", databaseMeta );
  rep.saveStepAttribute( idTransformation, idStep, "dimension", this.dimension );
  rep.saveStepAttribute( idTransformation, idStep, "elementtype", this.elementType );
  rep.saveStepAttribute( idTransformation, idStep, "createdimension", this.createNewDimension );
  rep.saveStepAttribute( idTransformation, idStep, "cleardimension", this.clearDimension );
  rep.saveStepAttribute( idTransformation, idStep, "clearconsolidations", this.clearConsolidations );
  rep.saveStepAttribute( idTransformation, idStep, "recreatedimension", this.recreateDimension );
  rep.saveStepAttribute( idTransformation, idStep, "enableElementCache", this.enableElementCache );
  rep.saveStepAttribute( idTransformation, idStep, "preloadElementCache", this.preloadElementCache );
  for ( int i = 0; i < levels.size(); i++ ) {
   rep.saveStepAttribute( idTransformation, idStep, i, "levelname", this.levels.get( i ).getLevelName() );
   rep.saveStepAttribute( idTransformation, idStep, i, "levelnumber", this.levels.get( i ).getLevelNumber() );
   rep.saveStepAttribute( idTransformation, idStep, i, "fieldname", this.levels.get( i ).getFieldName() );
   rep.saveStepAttribute( idTransformation, idStep, i, "fieldtype", this.levels.get( i ).getFieldType() );
   rep.saveStepAttribute( idTransformation, idStep, i, "consolidationfieldname", this.levels.get( i )
     .getConsolidationFieldName() );
  }
 } catch ( Exception e ) {
  throw new KettleException( "Unable to save step information to the repository for idStep=" + idStep, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
  rep.saveStepAttribute( id_transformation, id_step, "sql", sql );
  rep.saveStepAttribute( id_transformation, id_step, "catalog", catalog );
  rep.saveStepAttribute( id_transformation, id_step, "role", role );
  rep.saveStepAttribute( id_transformation, id_step, "variables_active", variableReplacementActive );
  // Also, save the step-database relationship!
  if ( databaseMeta != null ) {
   rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
  }
 } catch ( Exception e ) {
  throw new KettleException( "Unable to save step information to the repository for id_step=" + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
  rep.saveStepAttribute( id_transformation, id_step, "sql", sql );
  rep.saveStepAttribute( id_transformation, id_step, "limit", rowLimit );
  StreamInterface infoStream = getStepIOMeta().getInfoStreams().get( 0 );
  rep.saveStepAttribute( id_transformation, id_step, "lookup", infoStream.getStepname() );
  rep.saveStepAttribute( id_transformation, id_step, "execute_each_row", executeEachInputRow );
  rep.saveStepAttribute( id_transformation, id_step, "variables_active", variableReplacementActive );
  rep.saveStepAttribute( id_transformation, id_step, "lazy_conversion_active", lazyConversionActive );
  // Also, save the step-database relationship!
  if ( databaseMeta != null ) {
   rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
  }
 } catch ( Exception e ) {
  throw new KettleException( "Unable to save step information to the repository for id_step=" + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idTransformation, ObjectId idStep )
 throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( idTransformation, idStep, "connection", databaseMeta );
  rep.saveStepAttribute( idTransformation, idStep, "cube", this.cube );
  rep.saveStepAttribute( idTransformation, idStep, "measuretype", this.measureType );
  rep.saveStepAttribute( idTransformation, idStep, "updateMode", this.updateMode );
  rep.saveStepAttribute( idTransformation, idStep, "splashMode", this.splashMode );
  rep.saveStepAttribute( idTransformation, idStep, "clearcube", this.clearCube );
  rep.saveStepAttribute( idTransformation, idStep, "preloadDimensionCache", this.preloadDimensionCache );
  rep.saveStepAttribute( idTransformation, idStep, "enableDimensionCache", this.enableDimensionCache );
  rep.saveStepAttribute( idTransformation, idStep, "commitSize", this.commitSize );
  rep.saveStepAttribute( idTransformation, idStep, "measurename", this.measureField.getDimensionName() );
  rep.saveStepAttribute( idTransformation, idStep, "measurefieldname", this.measureField.getFieldName() );
  rep.saveStepAttribute( idTransformation, idStep, "measurefieldtype", this.measureField.getFieldType() );
  for ( int i = 0; i < this.fields.size(); i++ ) {
   rep.saveStepAttribute( idTransformation, idStep, i, "dimensionname", this.fields.get( i ).getDimensionName() );
   rep.saveStepAttribute( idTransformation, idStep, i, "fieldname", this.fields.get( i ).getFieldName() );
   rep.saveStepAttribute( idTransformation, idStep, i, "fieldtype", this.fields.get( i ).getFieldType() );
  }
 } catch ( Exception e ) {
  throw new KettleException( "Unable to save step information to the repository for idStep=" + idStep, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute(
   id_transformation, id_step, "reference_connection_id", referenceConnection );
  rep.saveStepAttribute( id_transformation, id_step, "reference_schema_field", referenceSchemaField );
  rep.saveStepAttribute( id_transformation, id_step, "reference_table_field", referenceTableField );
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "compare_connection_id", compareConnection );
  rep.saveStepAttribute( id_transformation, id_step, "compare_schema_field", compareSchemaField );
  rep.saveStepAttribute( id_transformation, id_step, "compare_table_field", compareTableField );
  rep.saveStepAttribute( id_transformation, id_step, "key_fields_field", keyFieldsField );
  rep.saveStepAttribute( id_transformation, id_step, "exclude_fields_field", excludeFieldsField );
  rep.saveStepAttribute( id_transformation, id_step, "nr_errors_field", nrErrorsField );
  rep.saveStepAttribute( id_transformation, id_step, "nr_records_reference_field", nrRecordsReferenceField );
  rep.saveStepAttribute( id_transformation, id_step, "nr_records_compare_field", nrRecordsCompareField );
  rep.saveStepAttribute( id_transformation, id_step, "nr_errors_left_join_field", nrErrorsLeftJoinField );
  rep.saveStepAttribute( id_transformation, id_step, "nr_errors_inner_join_field", nrErrorsInnerJoinField );
  rep.saveStepAttribute( id_transformation, id_step, "nr_errors_right_join_field", nrErrorsRightJoinField );
  rep.saveStepAttribute( id_transformation, id_step, "key_description_field", keyDescriptionField );
  rep.saveStepAttribute( id_transformation, id_step, "value_reference_field", valueReferenceField );
  rep.saveStepAttribute( id_transformation, id_step, "value_compare_field", valueCompareField );
 } catch ( Exception e ) {
  throw new KettleException( "Unable to save step information to the repository for id_step=" + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
  rep.saveStepAttribute( id_transformation, id_step, "rowlimit", rowLimit );
  rep.saveStepAttribute( id_transformation, id_step, "sql", sql );
  rep.saveStepAttribute( id_transformation, id_step, "outer_join", outerJoin );
  rep.saveStepAttribute( id_transformation, id_step, "replace_vars", replacevars );
  rep.saveStepAttribute( id_transformation, id_step, "sql_fieldname", sqlfieldname );
  rep.saveStepAttribute( id_transformation, id_step, "query_only_on_change", queryonlyonchange );
  // Also, save the step-database relationship!
  if ( databaseMeta != null ) {
   rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString( PKG, "DynamicSQLRowMeta.Exception.UnableToSaveStepInfo" )
   + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )
 throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", database );
  rep.saveStepAttribute( id_transformation, id_step, "tablename", tablename );
  rep.saveStepAttribute( id_transformation, id_step, "schemaname", schemaname );
  rep.saveStepAttribute( id_transformation, id_step, "istablenameInfield", istablenameInfield );
  rep.saveStepAttribute( id_transformation, id_step, "tablenamefield", tablenamefield );
  rep.saveStepAttribute( id_transformation, id_step, "columnnamefield", columnnamefield );
  rep.saveStepAttribute( id_transformation, id_step, "resultfieldname", resultfieldname );
  // Also, save the step-database relationship!
  if ( database != null ) {
   rep.insertStepDatabase( id_transformation, id_step, database.getObjectId() );
  }
 } catch ( Exception e ) {
  throw new KettleException(
    BaseMessages.getString( PKG, "ColumnExistsMeta.Exception.UnableToSaveStepInfo" ) + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
  rep.saveStepAttribute( id_transformation, id_step, "commit", commitSize );
  rep.saveStepAttribute( id_transformation, id_step, "schema", schemaName );
  rep.saveStepAttribute( id_transformation, id_step, "table", tableName );
  for ( int i = 0; i < keyStream.length; i++ ) {
   rep.saveStepAttribute( id_transformation, id_step, i, "key_name", keyStream[i] );
   rep.saveStepAttribute( id_transformation, id_step, i, "key_field", keyLookup[i] );
   rep.saveStepAttribute( id_transformation, id_step, i, "key_condition", keyCondition[i] );
   rep.saveStepAttribute( id_transformation, id_step, i, "key_name2", keyStream2[i] );
  }
  // Also, save the step-database relationship!
  if ( databaseMeta != null ) {
   rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString( PKG, "DeleteMeta.Exception.UnableToSaveStepInfo" )
   + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
  rep.saveStepAttribute( id_transformation, id_step, "rowlimit", rowLimit );
  rep.saveStepAttribute( id_transformation, id_step, "sql", sql );
  rep.saveStepAttribute( id_transformation, id_step, "outer_join", outerJoin );
  rep.saveStepAttribute( id_transformation, id_step, "replace_vars", replacevars );
  for ( int i = 0; i < parameterField.length; i++ ) {
   rep.saveStepAttribute( id_transformation, id_step, i, "parameter_field", parameterField[i] );
   rep.saveStepAttribute( id_transformation, id_step, i, "parameter_type", ValueMetaFactory
     .getValueMetaName( parameterType[i] ) );
  }
  // Also, save the step-database relationship!
  if ( databaseMeta != null ) {
   rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString( PKG, "DatabaseJoinMeta.Exception.UnableToSaveStepInfo" )
   + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
  rep.saveStepAttribute( id_transformation, id_step, "commit", commitSize );
  rep.saveStepAttribute( id_transformation, id_step, "sql_field", sqlField );
  rep.saveStepAttribute( id_transformation, id_step, "insert_field", insertField );
  rep.saveStepAttribute( id_transformation, id_step, "update_field", updateField );
  rep.saveStepAttribute( id_transformation, id_step, "delete_field", deleteField );
  rep.saveStepAttribute( id_transformation, id_step, "read_field", readField );
  // Also, save the step-database relationship!
  if ( databaseMeta != null ) {
   rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
  }
  rep.saveStepAttribute( id_transformation, id_step, "sqlFromfile", sqlFromfile );
  rep.saveStepAttribute( id_transformation, id_step, "sendOneStatement", sendOneStatement );
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString( PKG, "ExecSQLRowMeta.Exception.UnableToSaveStepInfo" )
   + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", database );
  rep.saveStepAttribute( id_transformation, id_step, "procedure", procedure );
  for ( int i = 0; i < argument.length; i++ ) {
   rep.saveStepAttribute( id_transformation, id_step, i, "arg_name", argument[i] );
   rep.saveStepAttribute( id_transformation, id_step, i, "arg_direction", argumentDirection[i] );
   rep.saveStepAttribute( id_transformation, id_step, i, "arg_type",
    ValueMetaFactory.getValueMetaName( argumentType[i] ) );
  }
  rep.saveStepAttribute( id_transformation, id_step, "result_name", resultName );
  rep.saveStepAttribute( id_transformation, id_step, "result_type",
   ValueMetaFactory.getValueMetaName( resultType ) );
  rep.saveStepAttribute( id_transformation, id_step, "auto_commit", autoCommit );
  // Also, save the step-database relationship!
  if ( database != null ) {
   rep.insertStepDatabase( id_transformation, id_step, database.getObjectId() );
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString( PKG, "DBProcMeta.Exception.UnableToSaveStepInfo" )
   + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveStepAttribute( id_transformation, id_step, "valuename", valuename );
  rep.saveStepAttribute( id_transformation, id_step, "use_database", useDatabase );
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", database );
  rep.saveStepAttribute( id_transformation, id_step, "schema", schemaName );
  rep.saveStepAttribute( id_transformation, id_step, "seqname", sequenceName );
  rep.saveStepAttribute( id_transformation, id_step, "use_counter", useCounter );
  rep.saveStepAttribute( id_transformation, id_step, "counter_name", counterName );
  rep.saveStepAttribute( id_transformation, id_step, "start_at", startAt );
  rep.saveStepAttribute( id_transformation, id_step, "increment_by", incrementBy );
  rep.saveStepAttribute( id_transformation, id_step, "max_value", maxValue );
  // Also, save the step-database relationship!
  if ( database != null ) {
   rep.insertStepDatabase( id_transformation, id_step, database.getObjectId() );
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString( PKG, "AddSequenceMeta.Exception.UnableToSaveStepInfo" )
   + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
  rep.saveStepAttribute( id_transformation, id_step, "schema", schemaName );
  rep.saveStepAttribute( id_transformation, id_step, "table", tableName );
  rep.saveStepAttribute( id_transformation, id_step, "load_action", loadAction );
  rep.saveStepAttribute( id_transformation, id_step, "dbname_override", dbNameOverride );
  rep.saveStepAttribute( id_transformation, id_step, "enclosure", enclosure );
  rep.saveStepAttribute( id_transformation, id_step, "delimiter", delimiter );
  rep.saveStepAttribute( id_transformation, id_step, "stop_on_error", stopOnError );
  for ( int i = 0; i < fieldTable.length; i++ ) {
   rep.saveStepAttribute( id_transformation, id_step, i, "stream_name", fieldTable[i] );
   rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldStream[i] );
   rep.saveStepAttribute( id_transformation, id_step, i, "date_mask", dateMask[i] );
  }
  // Also, save the step-database relationship!
  if ( databaseMeta != null ) {
   rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString(
   PKG, "GPBulkLoaderMeta.Exception.UnableToSaveStepInfoToRepository" )
   + id_step, e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
 try {
  rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
  rep.saveStepAttribute( id_transformation, id_step, "sql", sql );
  rep.saveStepAttribute( id_transformation, id_step, "execute_each_row", executedEachInputRow );
  rep.saveStepAttribute( id_transformation, id_step, "single_statement", singleStatement );
  rep.saveStepAttribute( id_transformation, id_step, "replace_variables", replaceVariables );
  rep.saveStepAttribute( id_transformation, id_step, "quoteString", quoteString );
  rep.saveStepAttribute( id_transformation, id_step, "set_params", setParams );
  rep.saveStepAttribute( id_transformation, id_step, "insert_field", insertField );
  rep.saveStepAttribute( id_transformation, id_step, "update_field", updateField );
  rep.saveStepAttribute( id_transformation, id_step, "delete_field", deleteField );
  rep.saveStepAttribute( id_transformation, id_step, "read_field", readField );
  // Also, save the step-database relationship!
  if ( databaseMeta != null ) {
   rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
  }
  for ( int i = 0; i < arguments.length; i++ ) {
   rep.saveStepAttribute( id_transformation, id_step, i, "arg_name", arguments[i] );
  }
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString( PKG, "ExecSQLMeta.Exception.UnableToSaveStepInfo" )
   + id_step, e );
 }
}

相关文章

Repository类方法