Package org.pentaho.di.core.database
Class RedshiftDatabaseMeta
- java.lang.Object
-
- org.pentaho.di.core.database.BaseDatabaseMeta
-
- org.pentaho.di.core.database.PostgreSQLDatabaseMeta
-
- org.pentaho.di.core.database.RedshiftDatabaseMeta
-
- All Implemented Interfaces:
Cloneable
,DatabaseInterface
,DatabaseInterfaceExtended
public class RedshiftDatabaseMeta extends PostgreSQLDatabaseMeta
- Author:
- mbatchelor
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUTHENTICATION_METHOD
static String
AWS_ACCESS_KEY
static String
AWS_ACCESS_KEY_ID
static String
IAM_ACCESS_KEY_ID
static String
IAM_CREDENTIALS
static String
IAM_PROFILE_NAME
static String
IAM_ROLE
static String
IAM_SECRET_ACCESS_KEY
static String
IAM_SESSION_TOKEN
static String
JDBC_AUTH_METHOD
static String
PROFILE_CREDENTIALS
static String
STANDARD_CREDENTIALS
-
Fields inherited from class org.pentaho.di.core.database.BaseDatabaseMeta
ATTRIBUTE_CLUSTER_DBNAME_PREFIX, ATTRIBUTE_CLUSTER_HOSTNAME_PREFIX, ATTRIBUTE_CLUSTER_PASSWORD_PREFIX, ATTRIBUTE_CLUSTER_PORT_PREFIX, ATTRIBUTE_CLUSTER_USERNAME_PREFIX, ATTRIBUTE_FORCE_IDENTIFIERS_TO_LOWERCASE, ATTRIBUTE_FORCE_IDENTIFIERS_TO_UPPERCASE, ATTRIBUTE_INITIAL_POOL_SIZE, ATTRIBUTE_IS_CLUSTERED, ATTRIBUTE_MAXIMUM_POOL_SIZE, ATTRIBUTE_MSSQL_DOUBLE_DECIMAL_SEPARATOR, ATTRIBUTE_POOLING_PARAMETER_PREFIX, ATTRIBUTE_PORT_NUMBER, 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_POOLING, ATTRIBUTE_USE_RESULT_STREAMING, AUTOINCREMENT_SQL_FOR_BATCH_ID, NAMED_CLUSTER_ID, poolingParameters, releaseSavepoint, SELECT_COUNT_STATEMENT, SEQUENCE_FOR_BATCH_ID
-
-
Constructor Summary
Constructors Constructor Description RedshiftDatabaseMeta()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAwsAccessKey()
String
getAwsAccessKeyId()
String
getAwsAuthenticationMethod()
int
getDefaultDatabasePort()
String
getDriverClass()
Obtain the name of the JDBC driver class that we need to use!String
getExtraOptionsHelpText()
String
getIamRole()
String
getURL(String hostname, String port, String databaseName)
String[]
getUsedLibraries()
String
getXulOverlayFile()
boolean
isFetchSizeSupported()
The superclass method checks whether or not the command setFetchSize() is supported by the driver.void
putOptionalOptions(Map<String,String> extraOptions)
boolean
supportsSetMaxRows()
Redshift does not recognize the JDBC "setMaxRows" parameter-
Methods inherited from class org.pentaho.di.core.database.PostgreSQLDatabaseMeta
getAccessTypeList, getAddColumnStatement, getDropColumnStatement, getExtraOptionIndicator, getExtraOptionSeparator, getFieldDefinition, getLimitClause, getMaxTextFieldLength, getMaxVARCHARLength, getModifyColumnStatement, getReservedWords, getSQLColumnExists, getSQLCurrentSequenceValue, getSQLListOfProcedures, getSQLListOfSequences, getSQLLockTables, getSQLNextSequenceValue, getSQLQueryColumnFields, getSQLQueryFields, getSQLSequenceExists, getSQLTableExists, getSQLUnlockTables, isDefaultingToUppercase, needsToLockAllTables, quoteSQLString, requiresCastToVariousForIsNull, supportsAutoInc, supportsBitmapIndex, supportsErrorHandlingOnBatchUpdates, supportsGetBlob, supportsRepository, supportsSequenceNoMaxValueOption, supportsSequences, supportsSynonyms, useSafePoints
-
Methods inherited from class org.pentaho.di.core.database.BaseDatabaseMeta
addAttribute, addDefaultOptions, addExtraOption, canTest, checkIndexExists, clone, customizeValueFromSQLType, fullExceptionLog, generateColumnAlias, getAccessType, getAttribute, getAttributes, getBackwardsCompatibleSchemaTableCombination, getBackwardsCompatibleTable, getConnectionPoolingProperties, getConnectSQL, getCreateTableStatement, getDatabaseFactoryName, getDatabaseName, getDatabasePortNumberString, getDataTablespace, getDataTablespaceDDL, getDefaultOptions, getDisplayName, getDropTableIfExistsStatement, getEndQuote, getExtraOptions, getExtraOptionValueSeparator, getFieldnameProtector, getFunctionAverage, getFunctionCount, getFunctionMaximum, getFunctionMinimum, getFunctionSum, getHostname, getIndexTablespace, getIndexTablespaceDDL, getInitialPoolSize, getInitialPoolSizeString, getMaxColumnsInIndex, getMaximumPoolSize, getMaximumPoolSizeString, getName, getNamedCluster, getNextBatchId, getNextBatchIdUsingAutoIncSQL, getNextBatchIdUsingLockTables, getNextBatchIdUsingSequence, getNotFoundTK, getObjectId, getPartitioningInformation, getPassword, getPluginId, getPluginName, getPreferredSchemaName, getSafeFieldname, getSchemaTableCombination, getSelectCountStatement, getSequenceNoMaxValueOption, getServername, getSQLInsertAutoIncUnknownDimensionRow, getSQLListOfSchemas, getSqlScriptStatements, getSQLValue, getStartQuote, getSynonymTypes, getTablespaceDDL, getTableTypes, getTruncateTableStatement, getUsername, getValueFromResultSet, getViewTypes, isChanged, isDisplaySizeTwiceThePrecision, isExplorable, isForcingIdentifiersToLowerCase, isForcingIdentifiersToUpperCase, isMySQLVariant, isPartitioned, isQuoteAllFields, isRequiringTransactionsOnQueries, isStreamingResults, isSystemTable, isUsingConnectionPool, isUsingDoubleDecimalAsSchemaTableSeparator, needsPlaceHolder, onlySpaces, parseStatements, preserveReservedCase, quoteReservedWords, releaseSavepoint, requiresCreateTablePrimaryKeyAppend, requiresName, setAccessType, setAttributes, setChanged, setConnectionPoolingProperties, setConnectSQL, setDatabaseName, setDatabasePortNumberString, setDataTablespace, setDisplayName, setForcingIdentifiersToLowerCase, setForcingIdentifiersToUpperCase, setHostname, setIndexTablespace, setInitialPoolSize, setInitialPoolSizeString, setMaximumPoolSize, setMaximumPoolSizeString, setName, setNamedCluster, setObjectId, setPartitioned, setPartitioningInformation, setPassword, setPluginId, setPluginName, setPreferredSchemaName, setPreserveReservedCase, setQuoteAllFields, setServername, setStreamingResults, setSupportsBooleanDataType, setSupportsTimestampDataType, setUsername, setUsingConnectionPool, setUsingDoubleDecimalAsSchemaTableSeparator, supportsAutoGeneratedKeys, supportsBatchUpdates, supportsBooleanDataType, supportsCatalogs, supportsEmptyTransactions, supportsErrorHandling, supportsFloatRoundingOnUpdate, supportsNewLinesInSQL, supportsOptionsInURL, supportsPreparedStatementMetadataRetrieval, supportsResultSetMetadataRetrievalOnly, supportsSchemas, supportsSetCharacterStream, supportsSetLong, supportsTimestampDataType, supportsTimeStampToDateConversion, supportsTransactions, supportsViews, useSchemaNameForTableList
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.di.core.database.DatabaseInterface
addAttribute, addDefaultOptions, addExtraOption, checkIndexExists, clone, createSqlScriptParser, customizeValueFromSQLType, generateColumnAlias, getAccessType, getAttribute, getAttributes, getConnectionPoolingProperties, getConnectSQL, getCreateTableStatement, getDatabaseFactoryName, getDatabaseName, getDatabasePortNumberString, getDataTablespace, getDataTablespaceDDL, getDefaultOptions, getDisplayName, getEndQuote, getExtraOptions, getExtraOptionValueSeparator, getFunctionAverage, getFunctionCount, getFunctionMaximum, getFunctionMinimum, getFunctionSum, getHostname, getIndexTablespace, getIndexTablespaceDDL, getInitialPoolSize, getInitialPoolSizeString, getLegacyColumnName, getMaxColumnsInIndex, getMaximumPoolSize, getMaximumPoolSizeString, getName, getNamedCluster, getNamedClusterList, getNextBatchId, getNotFoundTK, getObjectId, getPartitioningInformation, getPassword, getPluginId, getPluginName, getPreferredSchemaName, getSafeFieldname, getSchemas, getSchemaTableCombination, getSelectCountStatement, getSequenceNoMaxValueOption, getServername, getSQLInsertAutoIncUnknownDimensionRow, getSQLListOfSchemas, getSQLListOfSchemas, getSqlScriptStatements, getSQLValue, getStartQuote, getSynonymTypes, getTables, getTableTypes, getTruncateTableStatement, getUnsupportedTableOutputMessage, getUsername, getValueFromResultSet, getViewTypes, isChanged, isDisplaySizeTwiceThePrecision, isExplorable, isForcingIdentifiersToLowerCase, isForcingIdentifiersToUpperCase, isMySQLVariant, isPartitioned, isQuoteAllFields, isRequiringTransactionsOnQueries, isStreamingResults, isSystemTable, isUsingConnectionPool, isUsingDoubleDecimalAsSchemaTableSeparator, needsPlaceHolder, parseStatements, preserveReservedCase, quoteReservedWords, releaseSavepoint, requiresCreateTablePrimaryKeyAppend, setAccessType, setAttributes, setChanged, setConnectionPoolingProperties, setConnectSQL, setDatabaseName, setDatabasePortNumberString, setDataTablespace, setDisplayName, setForcingIdentifiersToLowerCase, setForcingIdentifiersToUpperCase, setHostname, setIndexTablespace, setInitialPoolSize, setInitialPoolSizeString, setMaximumPoolSize, setMaximumPoolSizeString, setName, setNamedCluster, setObjectId, setPartitioned, setPartitioningInformation, setPassword, setPluginId, setPluginName, setPreferredSchemaName, setPreserveReservedCase, setQuoteAllFields, setServername, setStreamingResults, setSupportsBooleanDataType, setSupportsTimestampDataType, setUsername, setUsingConnectionPool, setUsingDoubleDecimalAsSchemaTableSeparator, supportsAutoGeneratedKeys, supportsBatchUpdates, supportsBooleanDataType, supportsCatalogs, supportsEmptyTransactions, supportsErrorHandling, supportsFloatRoundingOnUpdate, supportsIndexes, supportsNewLinesInSQL, supportsOptionsInURL, supportsPreparedStatementMetadataRetrieval, supportsResultSetMetadataRetrievalOnly, supportsSchemas, supportsSetCharacterStream, supportsSetLong, supportsStandardTableOutput, supportsTimestampDataType, supportsTimeStampToDateConversion, supportsTransactions, supportsViews, useSchemaNameForTableList
-
-
-
-
Field Detail
-
IAM_ROLE
public static final String IAM_ROLE
- See Also:
- Constant Field Values
-
AWS_ACCESS_KEY_ID
public static final String AWS_ACCESS_KEY_ID
- See Also:
- Constant Field Values
-
AWS_ACCESS_KEY
public static final String AWS_ACCESS_KEY
- See Also:
- Constant Field Values
-
AUTHENTICATION_METHOD
public static final String AUTHENTICATION_METHOD
- See Also:
- Constant Field Values
-
STANDARD_CREDENTIALS
public static final String STANDARD_CREDENTIALS
- See Also:
- Constant Field Values
-
IAM_CREDENTIALS
public static final String IAM_CREDENTIALS
- See Also:
- Constant Field Values
-
PROFILE_CREDENTIALS
public static final String PROFILE_CREDENTIALS
- See Also:
- Constant Field Values
-
JDBC_AUTH_METHOD
public static final String JDBC_AUTH_METHOD
- See Also:
- Constant Field Values
-
IAM_ACCESS_KEY_ID
public static final String IAM_ACCESS_KEY_ID
- See Also:
- Constant Field Values
-
IAM_SECRET_ACCESS_KEY
public static final String IAM_SECRET_ACCESS_KEY
- See Also:
- Constant Field Values
-
IAM_SESSION_TOKEN
public static final String IAM_SESSION_TOKEN
- See Also:
- Constant Field Values
-
IAM_PROFILE_NAME
public static final String IAM_PROFILE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultDatabasePort
public int getDefaultDatabasePort()
- Specified by:
getDefaultDatabasePort
in interfaceDatabaseInterface
- Overrides:
getDefaultDatabasePort
in classPostgreSQLDatabaseMeta
- Returns:
- the default database port number
-
getDriverClass
public String getDriverClass()
Description copied from interface:DatabaseInterface
Obtain the name of the JDBC driver class that we need to use!- Specified by:
getDriverClass
in interfaceDatabaseInterface
- Overrides:
getDriverClass
in classPostgreSQLDatabaseMeta
- Returns:
- the name of the JDBC driver class for the specific database
-
getURL
public String getURL(String hostname, String port, String databaseName)
- Specified by:
getURL
in interfaceDatabaseInterface
- Overrides:
getURL
in classPostgreSQLDatabaseMeta
- Parameters:
hostname
- the hostnameport
- the port as a stringdatabaseName
- the database name- Returns:
- the URL to use for connecting to the database.
-
getExtraOptionsHelpText
public String getExtraOptionsHelpText()
- Specified by:
getExtraOptionsHelpText
in interfaceDatabaseInterface
- Overrides:
getExtraOptionsHelpText
in classPostgreSQLDatabaseMeta
- Returns:
- extra help text on the supported options on the selected database platform.
-
isFetchSizeSupported
public boolean isFetchSizeSupported()
The superclass method checks whether or not the command setFetchSize() is supported by the driver. In the case of Redshift, setFetchSize() is supported, but in the case of LIMIT, the Redshift driver will enforce that the value for fetch size is less than or equal to the value specified in the LIMIT clause. To avoid these problems, this method (and supportsSetMaxRows()) returns false- Specified by:
isFetchSizeSupported
in interfaceDatabaseInterface
- Overrides:
isFetchSizeSupported
in classPostgreSQLDatabaseMeta
- Returns:
- false
-
supportsSetMaxRows
public boolean supportsSetMaxRows()
Redshift does not recognize the JDBC "setMaxRows" parameter- Specified by:
supportsSetMaxRows
in interfaceDatabaseInterface
- Overrides:
supportsSetMaxRows
in classBaseDatabaseMeta
- Returns:
- false
-
getUsedLibraries
public String[] getUsedLibraries()
- Specified by:
getUsedLibraries
in interfaceDatabaseInterface
- Overrides:
getUsedLibraries
in classPostgreSQLDatabaseMeta
- Returns:
- the required libraries (in lib) for this database connection.
-
getIamRole
public String getIamRole()
-
getAwsAccessKeyId
public String getAwsAccessKeyId()
-
getAwsAccessKey
public String getAwsAccessKey()
-
getAwsAuthenticationMethod
public String getAwsAuthenticationMethod()
-
getXulOverlayFile
public String getXulOverlayFile()
- Specified by:
getXulOverlayFile
in interfaceDatabaseInterface
- Overrides:
getXulOverlayFile
in classBaseDatabaseMeta
- Returns:
- The name of the XUL overlay file to display extra options. This is only used in case of a non-standard plugin. Usually this method returns null.
-
-