Package org.apache.hop.databases.netezza
Class NetezzaDatabaseMeta
- java.lang.Object
-
- org.apache.hop.core.database.BaseDatabaseMeta
-
- org.apache.hop.databases.netezza.NetezzaDatabaseMeta
-
@DatabaseMetaPlugin(type="NETEZZA", typeDescription="Netezza", documentationUrl="/database/databases/netezza.html") @GuiPlugin(id="GUI-NetezzaDatabaseMeta") public class NetezzaDatabaseMeta extends BaseDatabaseMeta implements IDatabase
Contains Netezza specific information through static final members
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_CHAR_LEN-
Fields inherited from class org.apache.hop.core.database.BaseDatabaseMeta
accessType, ATTRIBUTE_FORCE_IDENTIFIERS_TO_LOWERCASE, ATTRIBUTE_FORCE_IDENTIFIERS_TO_UPPERCASE, ATTRIBUTE_MSSQL_DOUBLE_DECIMAL_SEPARATOR, ATTRIBUTE_PREFERRED_SCHEMA_NAME, ATTRIBUTE_PREFIX_EXTRA_OPTION, ATTRIBUTE_PRESERVE_RESERVED_WORD_CASE, ATTRIBUTE_QUOTE_ALL_FIELDS, ATTRIBUTE_SQL_CONNECT, ATTRIBUTE_SUPPORTS_BOOLEAN_DATA_TYPE, ATTRIBUTE_SUPPORTS_TIMESTAMP_DATA_TYPE, ATTRIBUTE_USE_RESULT_STREAMING, attributes, AUTOINCREMENT_SQL_FOR_BATCH_ID, databaseName, dataTablespace, hostname, ID_PASSWORD_LABEL, ID_PASSWORD_WIDGET, ID_USERNAME_LABEL, ID_USERNAME_WIDGET, indexTablespace, manualUrl, password, pluginId, pluginName, port, releaseSavepoint, SELECT_COUNT_STATEMENT, SEQUENCE_FOR_BATCH_ID, servername, username
-
-
Constructor Summary
Constructors Constructor Description NetezzaDatabaseMeta()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]getAccessTypeList()StringgetAddColumnStatement(String tableName, IValueMeta v, String tk, boolean useAutoinc, String pk, boolean semicolon)Generates the SQL statement to add a column to the specified table Note: Netezza does not allow adding columns to tablesintgetDefaultDatabasePort()StringgetDriverClass()StringgetDropColumnStatement(String tableName, IValueMeta v, String tk, boolean useAutoinc, String pk, boolean semicolon)Generates the SQL statement to drop a column from the specified table Note: Netezza does not allow addition/deletion of columns to tablesStringgetExtraOptionIndicator()StringgetExtraOptionSeparator()StringgetFieldDefinition(IValueMeta v, String tk, String pk, boolean useAutoinc, boolean addFieldName, boolean addCr)StringgetLimitClause(int nrRows)StringgetModifyColumnStatement(String tableName, IValueMeta v, String tk, boolean useAutoinc, String pk, boolean semicolon)Generates the SQL statement to modify a column in the specified table.String[]getReservedWords()StringgetSqlColumnExists(String columnname, String tableName)StringgetSqlCurrentSequenceValue(String sequenceName)Get the SQL to get the current value of a sequence.StringgetSqlListOfProcedures()StringgetSqlListOfSequences()StringgetSqlLockTables(String[] tableNames)StringgetSqlNextSequenceValue(String sequenceName)Get the SQL to get the next value of a sequence.StringgetSqlQueryColumnFields(String columnname, String tableName)StringgetSqlQueryFields(String tableName)StringgetSqlSequenceExists(String sequenceName)Check if a sequence exists.StringgetSqlTableExists(String tableName)StringgetSqlUnlockTables(String[] tableName)StringgetURL(String hostname, String port, String databaseName)booleanisDefaultingToUppercase()booleanisFetchSizeSupported()Checks whether or not the command setFetchSize() is supported by the JDBC driver...booleanisNetezzaVariant()booleanisSupportsAutoInc()booleanisSupportsBitmapIndex()booleanisSupportsSequences()booleanisSupportsSynonyms()booleanisSupportsTimeStampToDateConversion()-
Methods inherited from class org.apache.hop.core.database.BaseDatabaseMeta
addAttribute, addDefaultOptions, addExtraOption, canTest, clone, customizeValueFromSqlType, generateColumnAlias, getAccessType, getAttribute, getAttributeProperty, getAttributeProperty, getAttributes, getConnectSql, getCreateTableStatement, getDatabaseFactoryName, getDatabaseName, getDataTablespace, getDataTablespaceDDL, getDefaultOptions, getDropTableIfExistsStatement, getEndQuote, getExtraOptions, getExtraOptionsHelpText, getExtraOptionValueSeparator, getFieldnameProtector, getFunctionAverage, getFunctionCount, getFunctionMaximum, getFunctionMinimum, getFunctionSum, getHostname, getIndexTablespace, getIndexTablespaceDDL, getManualUrl, getMaxColumnsInIndex, getMaxTextFieldLength, getMaxVARCHARLength, getNotFoundTK, getPassword, getPluginId, getPluginName, getPort, getPreferredSchemaName, getSafeFieldname, getSchemaTableCombination, getSelectCountStatement, getSequenceNoMaxValueOption, getServername, getSqlDeleteStmt, getSqlInsertAutoIncUnknownDimensionRow, getSqlInsertClauseBeforeFields, getSqlListOfSchemas, getSqlScriptStatements, getSqlUpdateStmt, getSqlValue, getStartQuote, getSynonymTypes, getTablespaceDDL, getTableTypes, getTruncateTableStatement, getUsername, getValueFromResultSet, getViewTypes, hasIndex, isChanged, isDisplaySizeTwiceThePrecision, isExasolVariant, isExplorable, isForcingIdentifiersToLowerCase, isForcingIdentifiersToUpperCase, isFullExceptionLog, isInformixVariant, isMsSqlServerNativeVariant, isMsSqlServerVariant, isMySqlVariant, isNeedsPlaceHolder, isNeoviewVariant, isOracleVariant, isPostgresVariant, isPreserveReservedCase, isQuoteAllFields, isQuoteReservedWords, isReleaseSavepoint, isRequiresCastToVariousForIsNull, isRequiresCreateTablePrimaryKeyAppend, isRequiresName, isRequiringTransactionsOnQueries, isSqliteVariant, isStreamingResults, isStrictBigNumberInterpretation, isSupportsAutoGeneratedKeys, isSupportsBatchUpdates, isSupportsBooleanDataType, isSupportsCatalogs, isSupportsCustomDeleteStmt, isSupportsCustomUpdateStmt, isSupportsEmptyTransactions, isSupportsErrorHandling, IsSupportsErrorHandlingOnBatchUpdates, isSupportsFloatRoundingOnUpdate, isSupportsGetBlob, isSupportsNewLinesInSql, isSupportsOptionsInURL, isSupportsPreparedStatementMetadataRetrieval, isSupportsResultSetMetadataRetrievalOnly, isSupportsSchemas, isSupportsSequenceNoMaxValueOption, isSupportsSetCharacterStream, isSupportsSetLong, isSupportsSetMaxRows, isSupportsTimestampDataType, isSupportsTransactions, isSupportsViews, isSybaseIQVariant, isSybaseVariant, isSystemTable, isTeradataVariant, isUseSafePoints, isUsingDoubleDecimalAsSchemaTableSeparator, onlySpaces, parseStatements, quoteSqlString, setAccessType, setAttributes, setChanged, setConnectSql, setDatabaseName, setDataTablespace, setForcingIdentifiersToLowerCase, setForcingIdentifiersToUpperCase, setHostname, setIndexTablespace, setManualUrl, setPassword, setPluginId, setPluginName, setPort, setPreferredSchemaName, setPreserveReservedCase, setQuoteAllFields, setServername, setStreamingResults, setSupportsBooleanDataType, setSupportsTimestampDataType, setUsername, setUsingDoubleDecimalAsSchemaTableSeparator, useSchemaNameForTableList
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.hop.core.database.IDatabase
addAttribute, addDefaultOptions, addExtraOption, clone, createSqlScriptParser, customizeValueFromSqlType, generateColumnAlias, getAccessType, getAttribute, getAttributes, getConnectSql, getCreateTableStatement, getDatabaseFactoryName, getDatabaseName, getDataTablespace, getDataTablespaceDDL, getDefaultOptions, getDropTableIfExistsStatement, getEndQuote, getExtraOptions, getExtraOptionsHelpText, getExtraOptionValueSeparator, getFunctionAverage, getFunctionCount, getFunctionMaximum, getFunctionMinimum, getFunctionSum, getHostname, getIndexTablespace, getIndexTablespaceDDL, getLegacyColumnName, getManualUrl, getMaxColumnsInIndex, getMaxTextFieldLength, getMaxVARCHARLength, getNotFoundTK, getPassword, getPluginId, getPluginName, getPort, getPreferredSchemaName, getSafeFieldname, getSchemaTableCombination, getSelectCountStatement, getSequenceNoMaxValueOption, getServername, getSqlDeleteStmt, getSqlInsertAutoIncUnknownDimensionRow, getSqlInsertClauseBeforeFields, getSqlListOfSchemas, getSqlScriptStatements, getSqlUpdateStmt, getSqlValue, getStartQuote, getSynonymTypes, getTableTypes, getTruncateTableStatement, getUnsupportedTableOutputMessage, getUsername, getValueFromResultSet, getViewTypes, hasIndex, isChanged, isDisplaySizeTwiceThePrecision, isExasolVariant, isExplorable, isForcingIdentifiersToLowerCase, isForcingIdentifiersToUpperCase, isFullExceptionLog, isInformixVariant, isMsSqlServerNativeVariant, isMsSqlServerVariant, isMySqlVariant, isNeedsPlaceHolder, isNeoviewVariant, isOracleVariant, isPostgresVariant, isPreserveReservedCase, isQuoteAllFields, isQuoteReservedWords, isReleaseSavepoint, isRequiresCastToVariousForIsNull, isRequiresCreateTablePrimaryKeyAppend, isRequiresName, isRequiringTransactionsOnQueries, isSqliteVariant, isStreamingResults, isStrictBigNumberInterpretation, isSupportsAutoGeneratedKeys, isSupportsBatchUpdates, isSupportsBooleanDataType, isSupportsCatalogs, isSupportsCustomDeleteStmt, isSupportsCustomUpdateStmt, isSupportsEmptyTransactions, isSupportsErrorHandling, IsSupportsErrorHandlingOnBatchUpdates, isSupportsFloatRoundingOnUpdate, isSupportsGetBlob, isSupportsNewLinesInSql, isSupportsOptionsInURL, isSupportsPreparedStatementMetadataRetrieval, isSupportsResultSetMetadataRetrievalOnly, isSupportsSchemas, isSupportsSequenceNoMaxValueOption, isSupportsSetCharacterStream, isSupportsSetLong, isSupportsSetMaxRows, isSupportsTimestampDataType, isSupportsTransactions, isSupportsViews, isSybaseIQVariant, isSybaseVariant, isSystemTable, isTeradataVariant, isUseSafePoints, isUsingDoubleDecimalAsSchemaTableSeparator, parseStatements, quoteSqlString, setAccessType, setAttributes, setChanged, setConnectSql, setDatabaseName, setDataTablespace, setForcingIdentifiersToLowerCase, setForcingIdentifiersToUpperCase, setHostname, setIndexTablespace, setManualUrl, setPassword, setPluginId, setPluginName, setPort, setPreferredSchemaName, setPreserveReservedCase, setQuoteAllFields, setServername, setStreamingResults, setSupportsBooleanDataType, setSupportsTimestampDataType, setUsername, setUsingDoubleDecimalAsSchemaTableSeparator, supportsStandardTableOutput, useSchemaNameForTableList
-
-
-
-
Field Detail
-
MAX_CHAR_LEN
public static final int MAX_CHAR_LEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getExtraOptionSeparator
public String getExtraOptionSeparator()
- Specified by:
getExtraOptionSeparatorin interfaceIDatabase- Overrides:
getExtraOptionSeparatorin classBaseDatabaseMeta- Returns:
- The extra option separator in database URL for this platform
-
getExtraOptionIndicator
public String getExtraOptionIndicator()
- Specified by:
getExtraOptionIndicatorin interfaceIDatabase- Overrides:
getExtraOptionIndicatorin classBaseDatabaseMeta- Returns:
- This indicator separates the normal URL from the options
-
getAccessTypeList
public int[] getAccessTypeList()
- Specified by:
getAccessTypeListin interfaceIDatabase- Specified by:
getAccessTypeListin classBaseDatabaseMeta
-
getDefaultDatabasePort
public int getDefaultDatabasePort()
- Specified by:
getDefaultDatabasePortin interfaceIDatabase- Overrides:
getDefaultDatabasePortin classBaseDatabaseMeta
-
getDriverClass
public String getDriverClass()
- Specified by:
getDriverClassin interfaceIDatabase
-
isFetchSizeSupported
public boolean isFetchSizeSupported()
Checks whether or not the command setFetchSize() is supported by the JDBC driver...- Specified by:
isFetchSizeSupportedin interfaceIDatabase- Overrides:
isFetchSizeSupportedin classBaseDatabaseMeta- Returns:
- true is setFetchSize() is supported!
-
isSupportsBitmapIndex
public boolean isSupportsBitmapIndex()
- Specified by:
isSupportsBitmapIndexin interfaceIDatabase- Overrides:
isSupportsBitmapIndexin classBaseDatabaseMeta- Returns:
- true if the database supports bitmap indexes
-
isSupportsSynonyms
public boolean isSupportsSynonyms()
- Specified by:
isSupportsSynonymsin interfaceIDatabase- Overrides:
isSupportsSynonymsin classBaseDatabaseMeta- Returns:
- true if the database supports synonyms
-
isSupportsSequences
public boolean isSupportsSequences()
- Specified by:
isSupportsSequencesin interfaceIDatabase- Overrides:
isSupportsSequencesin classBaseDatabaseMeta
-
isSupportsAutoInc
public boolean isSupportsAutoInc()
- Specified by:
isSupportsAutoIncin interfaceIDatabase- Overrides:
isSupportsAutoIncin classBaseDatabaseMeta- Returns:
- true if auto incremment is supported
-
getLimitClause
public String getLimitClause(int nrRows)
- Specified by:
getLimitClausein interfaceIDatabase- Overrides:
getLimitClausein classBaseDatabaseMeta
-
getSqlQueryFields
public String getSqlQueryFields(String tableName)
- Specified by:
getSqlQueryFieldsin interfaceIDatabase- Overrides:
getSqlQueryFieldsin classBaseDatabaseMeta
-
getSqlTableExists
public String getSqlTableExists(String tableName)
- Specified by:
getSqlTableExistsin interfaceIDatabase- Overrides:
getSqlTableExistsin classBaseDatabaseMeta
-
getSqlColumnExists
public String getSqlColumnExists(String columnname, String tableName)
- Specified by:
getSqlColumnExistsin interfaceIDatabase- Overrides:
getSqlColumnExistsin classBaseDatabaseMeta
-
getSqlNextSequenceValue
public String getSqlNextSequenceValue(String sequenceName)
Get the SQL to get the next value of a sequence. (Netezza version)- Specified by:
getSqlNextSequenceValuein interfaceIDatabase- Overrides:
getSqlNextSequenceValuein classBaseDatabaseMeta- Parameters:
sequenceName- The sequence name- Returns:
- the SQL to get the next value of a sequence.
-
getSqlCurrentSequenceValue
public String getSqlCurrentSequenceValue(String sequenceName)
Get the SQL to get the current value of a sequence. (Netezza version)- Specified by:
getSqlCurrentSequenceValuein interfaceIDatabase- Overrides:
getSqlCurrentSequenceValuein classBaseDatabaseMeta- Parameters:
sequenceName- The sequence name- Returns:
- the SQL to get the current value of a sequence.
-
getSqlSequenceExists
public String getSqlSequenceExists(String sequenceName)
Check if a sequence exists.- Specified by:
getSqlSequenceExistsin interfaceIDatabase- Overrides:
getSqlSequenceExistsin classBaseDatabaseMeta- Parameters:
sequenceName- The sequence to check- Returns:
- The SQL to get the name of the sequence back from the databases data dictionary
-
getSqlListOfSequences
public String getSqlListOfSequences()
- Specified by:
getSqlListOfSequencesin interfaceIDatabase- Overrides:
getSqlListOfSequencesin classBaseDatabaseMeta
-
getAddColumnStatement
public String getAddColumnStatement(String tableName, IValueMeta v, String tk, boolean useAutoinc, String pk, boolean semicolon)
Generates the SQL statement to add a column to the specified table Note: Netezza does not allow adding columns to tables- Specified by:
getAddColumnStatementin interfaceIDatabase- Parameters:
tableName- The table to addv- The column defined as a valuetk- the name of the technical key fielduseAutoinc- whether or not this field uses auto incrementpk- the name of the primary key fieldsemicolon- whether or not to add a semi-colon behind the statement.- Returns:
- the SQL statement to add a column to the specified table
-
getDropColumnStatement
public String getDropColumnStatement(String tableName, IValueMeta v, String tk, boolean useAutoinc, String pk, boolean semicolon)
Generates the SQL statement to drop a column from the specified table Note: Netezza does not allow addition/deletion of columns to tables- Specified by:
getDropColumnStatementin interfaceIDatabase- Overrides:
getDropColumnStatementin classBaseDatabaseMeta- Parameters:
tableName- The table to addv- The column defined as a valuetk- the name of the technical key fielduseAutoinc- whether or not this field uses auto incrementpk- the name of the primary key fieldsemicolon- whether or not to add a semi-colon behind the statement.- Returns:
- the SQL statement to drop a column from the specified table
-
getModifyColumnStatement
public String getModifyColumnStatement(String tableName, IValueMeta v, String tk, boolean useAutoinc, String pk, boolean semicolon)
Generates the SQL statement to modify a column in the specified table. Note: Support for this in Netezza is incomplete since Netezza allows very limited table/column modifications post-creation- Specified by:
getModifyColumnStatementin interfaceIDatabase- Parameters:
tableName- The table to addv- The column defined as a valuetk- the name of the technical key fielduseAutoinc- whether or not this field uses auto incrementpk- the name of the primary key fieldsemicolon- whether or not to add a semi-colon behind the statement.- Returns:
- the SQL statement to modify a column in the specified table
-
getFieldDefinition
public String getFieldDefinition(IValueMeta v, String tk, String pk, boolean useAutoinc, boolean addFieldName, boolean addCr)
- Specified by:
getFieldDefinitionin interfaceIDatabase
-
getSqlListOfProcedures
public String getSqlListOfProcedures()
- Specified by:
getSqlListOfProceduresin interfaceIDatabase- Overrides:
getSqlListOfProceduresin classBaseDatabaseMeta- Parameters:
the- schema name to search in or null if you want to search the whole DB- Returns:
- The SQL on this database to get a list of stored procedures.
-
getReservedWords
public String[] getReservedWords()
- Specified by:
getReservedWordsin interfaceIDatabase- Overrides:
getReservedWordsin classBaseDatabaseMeta
-
getSqlLockTables
public String getSqlLockTables(String[] tableNames)
- Specified by:
getSqlLockTablesin interfaceIDatabase- Overrides:
getSqlLockTablesin classBaseDatabaseMeta- Parameters:
tableNames- The names of the tables to lock- Returns:
- The SQL commands to lock database tables for write purposes.
-
getSqlUnlockTables
public String getSqlUnlockTables(String[] tableName)
- Specified by:
getSqlUnlockTablesin interfaceIDatabase- Overrides:
getSqlUnlockTablesin classBaseDatabaseMeta- Parameters:
tableName- The name of the table to unlock- Returns:
- The SQL command to unlock a database table.
-
isDefaultingToUppercase
public boolean isDefaultingToUppercase()
- Specified by:
isDefaultingToUppercasein interfaceIDatabase- Overrides:
isDefaultingToUppercasein classBaseDatabaseMeta- Returns:
- true if the database defaults to naming tables and fields in uppercase. True for most databases except for stuborn stuff like Postgres ;-)
-
isSupportsTimeStampToDateConversion
public boolean isSupportsTimeStampToDateConversion()
- Specified by:
isSupportsTimeStampToDateConversionin interfaceIDatabase- Overrides:
isSupportsTimeStampToDateConversionin classBaseDatabaseMeta- Returns:
- true if the database resultsets support getTimeStamp() to retrieve date-time. (Date)
-
isNetezzaVariant
public boolean isNetezzaVariant()
- Specified by:
isNetezzaVariantin interfaceIDatabase- Overrides:
isNetezzaVariantin classBaseDatabaseMeta
-
-