@Override public DatabaseMeta loadDatabaseMetaFromStepAttribute( ObjectId objectId, String s, List<DatabaseMeta> list ) throws KettleException { return getDelegate().loadDatabaseMetaFromStepAttribute( objectId, s, list ); }
@Override public void readRep( Repository rep, IMetaStore metaStore, ObjectId idStep, List<DatabaseMeta> databases ) throws KettleException { try { this.databaseMeta = rep.loadDatabaseMetaFromStepAttribute( idStep, "connection", databases ); this.modelName = rep.getStepAttributeString( idStep, "modelName" ); this.commitBatchSize = Integer.parseInt( rep.getStepAttributeString( idStep, "readBatchSize" ) ); this.idFieldName = rep.getStepAttributeString( idStep, "idFieldName" ); } catch ( Exception e ) { throw new KettleException( "Unexpected error reading step information from the repository", e ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { database = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases ); tablenamefield = rep.getStepAttributeString( id_step, "tablenamefield" ); schemaname = rep.getStepAttributeString( id_step, "schemaname" ); resultfieldname = rep.getStepAttributeString( id_step, "resultfieldname" ); } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "TableExistsMeta.Exception.UnexpectedErrorReadingStepInfo" ), e ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases ); sql = rep.getStepAttributeString( id_step, "sql" ); catalog = rep.getStepAttributeString( id_step, "catalog" ); role = rep.getStepAttributeString( id_step, "role" ); variableReplacementActive = rep.getStepAttributeBoolean( id_step, "variables_active" ); } catch ( Exception e ) { throw new KettleException( "Unexpected error reading step information from the repository", e ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId idStep, List<DatabaseMeta> databases ) throws KettleException { try { this.databaseMeta = rep.loadDatabaseMetaFromStepAttribute( idStep, "connection", databases ); this.dimension = rep.getStepAttributeString( idStep, "dimension" ); this.baseElementsOnly = rep.getStepAttributeBoolean( idStep, "baseElementsOnly" ); int nrLevels = rep.countNrStepAttributes( idStep, "levelname" ); for ( int i = 0; i < nrLevels; i++ ) { String levelName = rep.getStepAttributeString( idStep, i, "levelname" ); int levelNumber = (int) rep.getStepAttributeInteger( idStep, i, "levelnumber" ); String fieldName = rep.getStepAttributeString( idStep, i, "fieldname" ); String fieldType = rep.getStepAttributeString( idStep, i, "fieldtype" ); this.levels.add( new PaloDimensionLevel( levelName, levelNumber, fieldName, fieldType ) ); } } catch ( Exception e ) { throw new KettleException( "Unexpected error reading step information from the repository", e ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { this.databases = databases; try { databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases ); 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" ); 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 ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases ); rowLimit = (int) rep.getStepAttributeInteger( id_step, "rowlimit" ); sql = rep.getStepAttributeString( id_step, "sql" ); outerJoin = rep.getStepAttributeBoolean( id_step, "outer_join" ); replacevars = rep.getStepAttributeBoolean( id_step, "replace_vars" ); sqlfieldname = rep.getStepAttributeString( id_step, "sql_fieldname" ); queryonlyonchange = rep.getStepAttributeBoolean( id_step, "query_only_on_change" ); } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "DynamicSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo" ), e ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) 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" ); columnnamefield = rep.getStepAttributeString( id_step, "columnnamefield" ); resultfieldname = rep.getStepAttributeString( id_step, "resultfieldname" ); } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "ColumnExistsMeta.Exception.UnexpectedErrorReadingStepInfo" ), e ); } }
@Override public void readRep( Repository rep, IMetaStore metaStore, ObjectId idStep, List<DatabaseMeta> databases ) throws KettleException { try { this.databaseMeta = rep.loadDatabaseMetaFromStepAttribute( idStep, "connection", databases ); this.modelName = rep.getStepAttributeString( idStep, "modelName" ); this.commitBatchSize = Integer.parseInt( rep.getStepAttributeString( idStep, "readBatchSize" ) ); this.outputIDField = rep.getStepAttributeBoolean( idStep, "outputIDField" ); this.outputIDFieldName = rep.getStepAttributeString( idStep, "outputIDFieldName" ); int nrMappings = rep.countNrStepAttributes( idStep, "model_field" ); allocate( nrMappings ); for ( int i = 0; i < nrMappings; i++ ) { modelFields[i] = rep.getStepAttributeString( idStep, i, "model_field" ); streamFields[i] = rep.getStepAttributeString( idStep, i, "stream_field" ); } nrMappings = rep.countNrStepAttributes( idStep, "model_key_field" ); allocate( nrMappings ); keyLookups.clear(); for ( int i = 0; i < nrMappings; i++ ) { String[] key_maps = new String[3]; key_maps[0] = rep.getStepAttributeString( idStep, i, "model_key_field" ); key_maps[1] = rep.getStepAttributeString( idStep, i, "comparitor" ); key_maps[2] = rep.getStepAttributeString( idStep, i, "stream_key_field" ); keyLookups.add( key_maps ); } } catch ( Exception e ) { throw new KettleException( "Unexpected error reading step information from the repository", e ); } }
@Override public void readRep( Repository rep, IMetaStore metaStore, ObjectId idStep, List<DatabaseMeta> databases ) throws KettleException { try { this.databaseMeta = rep.loadDatabaseMetaFromStepAttribute( idStep, "connection", databases ); this.cube = rep.getStepAttributeString( idStep, "cube" ); String cubeMeasureName = rep.getStepAttributeString( idStep, "cubemeasurename" ); String cubeMeasureType = rep.getStepAttributeString( idStep, "cubemeasuretype" ); this.cubeMeasure = new DimensionField( "Measure", cubeMeasureName, cubeMeasureType ); int nrFields = rep.countNrStepAttributes( idStep, "dimensionname" ); for ( int i = 0; i < nrFields; i++ ) { String dimensionName = rep.getStepAttributeString( idStep, i, "dimensionname" ); String fieldName = rep.getStepAttributeString( idStep, i, "fieldname" ); String fieldType = rep.getStepAttributeString( idStep, i, "fieldtype" ); this.fields.add( new DimensionField( dimensionName, fieldName, fieldType ) ); } } catch ( Exception e ) { throw new KettleException( "Unexpected error reading step" + " information from the repository", e ); } }
@Override public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { referenceConnection = rep.loadDatabaseMetaFromStepAttribute( id_step, "reference_connection_id", databases ); referenceSchemaField = rep.getStepAttributeString( id_step, "reference_schema_field" ); referenceTableField = rep.getStepAttributeString( id_step, "reference_table_field" ); compareConnection = rep.loadDatabaseMetaFromStepAttribute( id_step, "compare_connection_id", databases ); compareSchemaField = rep.getStepAttributeString( id_step, "compare_schema_field" ); compareTableField = rep.getStepAttributeString( id_step, "compare_table_field" ); keyFieldsField = rep.getStepAttributeString( id_step, "key_fields_field" ); excludeFieldsField = rep.getStepAttributeString( id_step, "exclude_fields_field" ); nrErrorsField = rep.getStepAttributeString( id_step, "nr_errors_field" ); nrRecordsReferenceField = rep.getStepAttributeString( id_step, "nr_records_reference_field" ); nrRecordsCompareField = rep.getStepAttributeString( id_step, "nr_records_compare_field" ); nrErrorsLeftJoinField = rep.getStepAttributeString( id_step, "nr_errors_left_join_field" ); nrErrorsInnerJoinField = rep.getStepAttributeString( id_step, "nr_errors_inner_join_field" ); nrErrorsRightJoinField = rep.getStepAttributeString( id_step, "nr_errors_right_join_field" ); keyDescriptionField = rep.getStepAttributeString( id_step, "key_description_field" ); valueReferenceField = rep.getStepAttributeString( id_step, "value_reference_field" ); valueCompareField = rep.getStepAttributeString( id_step, "value_compare_field" ); } catch ( Exception e ) { throw new KettleException( "Unexpected error reading step information from the repository", e ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases ); commitSize = rep.getStepAttributeString( id_step, "commit" ); if ( commitSize == null ) { long comSz = -1; try { comSz = rep.getStepAttributeInteger( id_step, "commit" ); } catch ( Exception ex ) { commitSize = "100"; } if ( comSz >= 0 ) { commitSize = Long.toString( comSz ); } } schemaName = rep.getStepAttributeString( id_step, "schema" ); tableName = rep.getStepAttributeString( id_step, "table" ); int nrkeys = rep.countNrStepAttributes( id_step, "key_name" ); allocate( nrkeys ); for ( int i = 0; i < nrkeys; i++ ) { keyStream[i] = rep.getStepAttributeString( id_step, i, "key_name" ); keyLookup[i] = rep.getStepAttributeString( id_step, i, "key_field" ); keyCondition[i] = rep.getStepAttributeString( id_step, i, "key_condition" ); keyStream2[i] = rep.getStepAttributeString( id_step, i, "key_name2" ); } } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "DeleteMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e ); } }
@Override public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases ); rowLimit = (int) rep.getStepAttributeInteger( id_step, "rowlimit" ); sql = rep.getStepAttributeString( id_step, "sql" ); outerJoin = rep.getStepAttributeBoolean( id_step, "outer_join" ); replacevars = rep.getStepAttributeBoolean( id_step, "replace_vars" ); int nrparam = rep.countNrStepAttributes( id_step, "parameter_field" ); allocate( nrparam ); for ( int i = 0; i < nrparam; i++ ) { parameterField[i] = rep.getStepAttributeString( id_step, i, "parameter_field" ); String stype = rep.getStepAttributeString( id_step, i, "parameter_type" ); parameterType[i] = ValueMetaFactory.getIdForValueMeta( stype ); } } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "DatabaseJoinMeta.Exception.UnexpectedErrorReadingStepInfo" ), e ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId idStep, List<DatabaseMeta> databases ) throws KettleException { try { this.databaseMeta = rep.loadDatabaseMetaFromStepAttribute( idStep, "connection", databases ); this.dimension = rep.getStepAttributeString( idStep, "dimension" ); this.elementType = rep.getStepAttributeString( idStep, "elementtype" ); this.createNewDimension = rep.getStepAttributeBoolean( idStep, "createdimension" ); this.clearDimension = rep.getStepAttributeBoolean( idStep, "cleardimension" ); this.clearConsolidations = rep.getStepAttributeBoolean( idStep, "clearconsolidations" ); this.recreateDimension = rep.getStepAttributeBoolean( idStep, "recreatedimension" ); this.enableElementCache = rep.getStepAttributeBoolean( idStep, "enableElementCache" ); this.preloadElementCache = rep.getStepAttributeBoolean( idStep, "preloadElementCache" ); int nrLevels = rep.countNrStepAttributes( idStep, "levelname" ); for ( int i = 0; i < nrLevels; i++ ) { String levelName = rep.getStepAttributeString( idStep, i, "levelname" ); int levelNumber = (int) rep.getStepAttributeInteger( idStep, i, "levelnumber" ); String fieldName = rep.getStepAttributeString( idStep, i, "fieldname" ); String fieldType = rep.getStepAttributeString( idStep, i, "fieldtype" ); String consolidationField = rep.getStepAttributeString( idStep, i, "consolidationfieldname" ); this.levels.add( new PaloDimensionLevel( levelName, levelNumber, fieldName, fieldType, consolidationField ) ); } } catch ( Exception e ) { throw new KettleException( "Unexpected error reading step information from the repository", e ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { database = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases ); procedure = rep.getStepAttributeString( id_step, "procedure" ); int nrargs = rep.countNrStepAttributes( id_step, "arg_name" ); allocate( nrargs ); for ( int i = 0; i < nrargs; i++ ) { argument[i] = rep.getStepAttributeString( id_step, i, "arg_name" ); argumentDirection[i] = rep.getStepAttributeString( id_step, i, "arg_direction" ); argumentType[i] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "arg_type" ) ); } resultName = rep.getStepAttributeString( id_step, "result_name" ); resultType = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, "result_type" ) ); autoCommit = rep.getStepAttributeBoolean( id_step, 0, "auto_commit", true ); } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "DBProcMeta.Exception.UnexpectedErrorReadingStepInfo" ), e ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { this.databasesList = databases; try { databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases ); commitSize = (int) rep.getStepAttributeInteger( id_step, "commit" ); sqlField = rep.getStepAttributeString( id_step, "sql_field" ); insertField = rep.getStepAttributeString( id_step, "insert_field" ); updateField = rep.getStepAttributeString( id_step, "update_field" ); deleteField = rep.getStepAttributeString( id_step, "delete_field" ); readField = rep.getStepAttributeString( id_step, "read_field" ); sqlFromfile = rep.getStepAttributeBoolean( id_step, "sqlFromfile" ); String sendOneStatementString = rep.getStepAttributeString( id_step, "sendOneStatement" ); if ( Utils.isEmpty( sendOneStatementString ) ) { sendOneStatement = true; } else { sendOneStatement = rep.getStepAttributeBoolean( id_step, "sendOneStatement" ); } } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "ExecSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo" ), e ); } }
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" ); loadAction = rep.getStepAttributeString( id_step, "load_action" ); stopOnError = rep.getStepAttributeBoolean( id_step, "stop_on_error" ); dbNameOverride = rep.getStepAttributeString( id_step, "dbname_override" ); enclosure = rep.getStepAttributeString( id_step, "enclosure" ); delimiter = rep.getStepAttributeString( id_step, "delimiter" ); int nrvalues = rep.countNrStepAttributes( id_step, "stream_name" ); allocate( nrvalues ); for ( int i = 0; i < nrvalues; i++ ) { fieldTable[i] = rep.getStepAttributeString( id_step, i, "stream_name" ); fieldStream[i] = rep.getStepAttributeString( id_step, i, "field_name" ); dateMask[i] = rep.getStepAttributeString( id_step, i, "date_mask" ); } } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository" ), e ); } }
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases ); executedEachInputRow = rep.getStepAttributeBoolean( id_step, "execute_each_row" ); singleStatement = rep.getStepAttributeBoolean( id_step, "single_statement" ); replaceVariables = rep.getStepAttributeBoolean( id_step, "replace_variables" ); quoteString = rep.getStepAttributeBoolean( id_step, "quoteString" ); sql = rep.getStepAttributeString( id_step, "sql" ); setParams = rep.getStepAttributeBoolean( id_step, "set_params" ); insertField = rep.getStepAttributeString( id_step, "insert_field" ); updateField = rep.getStepAttributeString( id_step, "update_field" ); deleteField = rep.getStepAttributeString( id_step, "delete_field" ); readField = rep.getStepAttributeString( id_step, "read_field" ); int nrargs = rep.countNrStepAttributes( id_step, "arg_name" ); allocate( nrargs ); for ( int i = 0; i < nrargs; i++ ) { arguments[i] = rep.getStepAttributeString( id_step, i, "arg_name" ); } } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "ExecSQLMeta.Exception.UnexpectedErrorReadingStepInfo" ), e ); } }
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" ); 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 ); } }
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" ); encoding = rep.getStepAttributeString( id_step, "encoding" ); enclosure = rep.getStepAttributeString( id_step, "enclosure" ); delimiter = rep.getStepAttributeString( id_step, "delimiter" ); escapeChar = rep.getStepAttributeString( id_step, "escape_char" ); fifoFileName = rep.getStepAttributeString( id_step, "fifo_file_name" ); replacingData = rep.getStepAttributeBoolean( id_step, "replace" ); ignoringErrors = rep.getStepAttributeBoolean( id_step, "ignore" ); localFile = rep.getStepAttributeBoolean( id_step, "local" ); bulkSize = rep.getStepAttributeString( id_step, "bulk_size" ); int nrvalues = rep.countNrStepAttributes( id_step, "stream_name" ); allocate( nrvalues ); for ( int i = 0; i < nrvalues; i++ ) { fieldTable[i] = rep.getStepAttributeString( id_step, i, "stream_name" ); fieldStream[i] = rep.getStepAttributeString( id_step, i, "field_name" ); if ( fieldStream[i] == null ) { fieldStream[i] = fieldTable[i]; } fieldFormatType[i] = getFieldFormatType( rep.getStepAttributeString( id_step, i, "field_format_ok" ) ); } } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "MySQLBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository" ), e ); } }