public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
    throws KettleException {
    try {
      databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases );
      schemaName = rep.getStepAttributeString( id_step, "schema" );
      tableName = rep.getStepAttributeString( id_step, "table" );
      commitSize = rep.getStepAttributeString( id_step, "commit" );
      truncateTable = rep.getStepAttributeBoolean( id_step, "truncate" );
      ignoreErrors = rep.getStepAttributeBoolean( id_step, "ignore_errors" );
      useBatchUpdate = rep.getStepAttributeBoolean( id_step, "use_batch" );
      specifyFields = rep.getStepAttributeBoolean( id_step, "specify_fields" );

      partitioningEnabled = rep.getStepAttributeBoolean( id_step, "partitioning_enabled" );
      partitioningField = rep.getStepAttributeString( id_step, "partitioning_field" );
      partitioningDaily = rep.getStepAttributeBoolean( id_step, "partitioning_daily" );
      partitioningMonthly = rep.getStepAttributeBoolean( id_step, "partitioning_monthly" );

      tableNameInField = rep.getStepAttributeBoolean( id_step, "tablename_in_field" );
      tableNameField = rep.getStepAttributeString( id_step, "tablename_field" );
      tableNameInTable = rep.getStepAttributeBoolean( id_step, "tablename_in_table" );

      returningGeneratedKeys = rep.getStepAttributeBoolean( id_step, "return_keys" );
      generatedKeyField = rep.getStepAttributeString( id_step, "return_field" );

      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++ ) {
        fieldDatabase[ idx ] = Const.NVL( rep.getStepAttributeString( id_step, idx, "column_name" ), "" );
        fieldStream[ idx ] = Const.NVL( rep.getStepAttributeString( id_step, idx, "stream_name" ), "" );
      }
    } catch ( Exception e ) {
      throw new KettleException( "Unexpected error reading step information from the repository", e );
    }
  }
@Test
  public void testReadRep() throws KettleException {

    //check variable
    String commitSize = "${test}";

    Repository rep = new MemoryRepository();
    rep.saveStepAttribute( null, null, "commit", commitSize );

    TableOutputMeta tableOutputMeta = new TableOutputMeta();
    tableOutputMeta.readRep( rep, metaStore, null, databases );

    assertEquals( commitSize, tableOutputMeta.getCommitSize() );

    //check integer size
    int commitSizeInt = 1;
    Repository rep2 = new MemoryRepository();
    rep2.saveStepAttribute( null, null, "commit", commitSizeInt );

    TableOutputMeta tableOutputMeta2 = new TableOutputMeta();
    tableOutputMeta2.readRep( rep2, metaStore, null, databases );

    assertEquals( String.valueOf( commitSizeInt ), tableOutputMeta2.getCommitSize() );
  }