private StringBuilder appendConnectionInfo( StringBuilder report, Database db, DatabaseMeta databaseMeta ) { // Check to see if the interface is of a type GenericDatabaseMeta, since it does not have hostname and port fields if ( databaseMeta.getDatabaseInterface() instanceof GenericDatabaseMeta ) { String customUrl = databaseMeta.getAttributes().getProperty( GenericDatabaseMeta.ATRRIBUTE_CUSTOM_URL ); String customDriverClass = databaseMeta.getAttributes().getProperty( GenericDatabaseMeta.ATRRIBUTE_CUSTOM_DRIVER_CLASS ); return report.append( BaseMessages.getString( PKG, "GenericDatabaseMeta.report.customUrl" ) ).append( db.environmentSubstitute( customUrl ) ).append( Const.CR ).append( BaseMessages.getString( PKG, "GenericDatabaseMeta.report.customDriverClass" ) ).append( db.environmentSubstitute( customDriverClass ) ).append( Const.CR ); } return appendConnectionInfo( report, db.environmentSubstitute( databaseMeta.getHostname() ), db .environmentSubstitute( databaseMeta.getDatabasePortNumberString() ), db .environmentSubstitute( databaseMeta.getDatabaseName() ) ); }
@Override public boolean getBooleanValueOfVariable( String variableName, boolean defaultValue ) { if ( !Utils.isEmpty( variableName ) ) { String value = environmentSubstitute( variableName ); if ( !Utils.isEmpty( value ) ) { return ValueMetaBase.convertStringToBoolean( value ); } } return defaultValue; }
String schemaTable = databaseMeta.getQuotedSchemaTableCombination( environmentSubstitute( logTable.getActualSchemaName() ), environmentSubstitute( logTable .getActualTableName() ) ); RowMetaInterface rowMeta = logRecord.getRowMeta(); insertRow( environmentSubstitute( logTable.getActualSchemaName() ), environmentSubstitute( logTable .getActualTableName() ), logRecord.getRowMeta(), logRecord.getData() ); DatabaseLogExceptionFactory.getExceptionStrategy( logTable, e ) .registerException( log, e, PKG, "Database.Error.WriteLogTable", environmentSubstitute( logTable.getActualTableName() ) );
if ( schemaname == null ) { if ( databaseMeta.useSchemaNameForTableList() ) { schemaname = environmentSubstitute( databaseMeta.getUsername() ).toUpperCase();
public void cleanupLogRecords( LogTableCoreInterface logTable ) throws KettleDatabaseException { double timeout = Const.toDouble( Const.trim( environmentSubstitute( logTable.getTimeoutInDays() ) ), 0.0 ); if ( timeout < 0.000001 ) { databaseMeta.getQuotedSchemaTableCombination( environmentSubstitute( logTable.getActualSchemaName() ), environmentSubstitute( logTable.getActualTableName() ) ); DatabaseLogExceptionFactory.getExceptionStrategy( logTable ) .registerException( log, PKG, "Database.Exception.UnableToCleanUpOlderRecordsFromLogTable", environmentSubstitute( logTable.getActualTableName() ) );
if ( schemaname == null ) { if ( databaseMeta.useSchemaNameForTableList() ) { schemaname = environmentSubstitute( databaseMeta.getUsername() ).toUpperCase();
appendConnectionInfo( report, db.environmentSubstitute( partitioningInformation[i].getHostname() ), db .environmentSubstitute( partitioningInformation[i].getPort() ), db .environmentSubstitute( partitioningInformation[i].getDatabaseName() ) ); report.append( Const.CR ); appendJndiConnectionInfo( report, db.environmentSubstitute( databaseMeta.getDatabaseName() ) ); } else { appendConnectionInfo( report, db, databaseMeta );
url = environmentSubstitute( databaseMeta.getURL( partitionId ) ); } else { url = environmentSubstitute( databaseMeta.getURL() ); password = clusterPassword; } else { username = environmentSubstitute( databaseMeta.getUsername() ); password = Encr.decryptPasswordOptionallyEncrypted( environmentSubstitute( databaseMeta.getPassword() ) ); String instance = environmentSubstitute( databaseMeta.getSQLServerInstance() ); if ( !Utils.isEmpty( instance ) ) { url += ";instanceName=" + instance;
if ( schemaname == null ) { if ( databaseMeta.useSchemaNameForTableList() ) { schemaname = environmentSubstitute( databaseMeta.getUsername() ).toUpperCase();
String tableName = db.environmentSubstitute( logTable.getTableName() ); String schemaTable = logTable.getDatabaseMeta().getQuotedSchemaTableCombination( db.environmentSubstitute( logTable.getSchemaName() ), db.environmentSubstitute( logTable.getTableName() ) ); String createTable = db.getDDL( schemaTable, fields );
String tableName = db.environmentSubstitute( logTable.getTableName() ); String schemaTable = logTable.getDatabaseMeta().getQuotedSchemaTableCombination( db.environmentSubstitute( logTable.getSchemaName() ), tableName ); String createTable = db.getDDL( schemaTable, fields );
db.environmentSubstitute( schemaName ), db.environmentSubstitute( tablename ) );
RowMetaInterface r = db.getTableFieldsMeta( db.environmentSubstitute( wSchema.getText() ), db.environmentSubstitute( wTable.getText() ) ); if ( r != null && !r.isEmpty() ) { String schemaTable = ci.getQuotedSchemaTableCombination( db.environmentSubstitute( wSchema.getText() ), db .environmentSubstitute( wTable.getText() ) ); logDebug( BaseMessages.getString( PKG, "DatabaseLookupDialog.Log.FoundTableFields" ) + schemaTable + " --> " + r.toStringMeta() );
String jndiName = environmentSubstitute( databaseMeta.getDatabaseName() ); try { this.connection = dsp.getNamedDataSource( jndiName, DatasourceType.JNDI ).getConnection(); String sql = environmentSubstitute( databaseMeta.getConnectSQL() );
String realSchemaName = db.environmentSubstitute( schemaName ); String realTableName = db.environmentSubstitute( tableName ); String schemaTable = databaseMeta.getQuotedSchemaTableCombination( realSchemaName, realTableName );
sNewSQL = db.environmentSubstitute( sql ); if ( space != null ) { sNewSQL = space.environmentSubstitute( sNewSQL );