Class DatabricksDatabaseMeta

java.lang.Object
org.pentaho.di.core.database.BaseDatabaseMeta
org.pentaho.di.core.database.DatabricksDatabaseMeta
All Implemented Interfaces:
Cloneable, DatabaseInterface, DatabaseInterfaceExtended

public class DatabricksDatabaseMeta extends BaseDatabaseMeta
https://docs.databricks.com/en/integrations/jdbc-odbc-bi.html#jdbc-driver
  • Constructor Details

    • DatabricksDatabaseMeta

      public DatabricksDatabaseMeta()
  • Method Details

    • getDriverClass

      public String getDriverClass()
      Description copied from interface: DatabaseInterface
      Obtain the name of the JDBC driver class that we need to use!
      Returns:
      the name of the JDBC driver class for the specific database
    • setAttributes

      public void setAttributes(Properties attributes)
      Description copied from class: BaseDatabaseMeta
      Set extra attributes on this database connection
      Specified by:
      setAttributes in interface DatabaseInterface
      Overrides:
      setAttributes in class BaseDatabaseMeta
      Parameters:
      attributes - The extra attributes to set on this database connection.
    • getAccessTypeList

      public int[] getAccessTypeList()
      Description copied from interface: DatabaseInterface
      Get the list of possible access types for a database.
      Specified by:
      getAccessTypeList in interface DatabaseInterface
      Specified by:
      getAccessTypeList in class BaseDatabaseMeta
      Returns:
      the list of possible access types for a database.
    • getDefaultDatabasePort

      public int getDefaultDatabasePort()
      Specified by:
      getDefaultDatabasePort in interface DatabaseInterface
      Overrides:
      getDefaultDatabasePort in class BaseDatabaseMeta
      Returns:
      the default database port number
    • getURL

      public String getURL(String hostname, String port, String databaseName) throws KettleDatabaseException
      Parameters:
      hostname - the hostname
      port - the port as a string
      databaseName - the database name
      Returns:
      the URL to use for connecting to the database.
      Throws:
      KettleDatabaseException - in case a configuration error is detected.
    • getAuthMethod

      public DatabricksDatabaseMeta.AuthMethod getAuthMethod()
    • setAuthMethod

      public void setAuthMethod(DatabricksDatabaseMeta.AuthMethod authMethod)
    • getHttpPath

      public Optional<String> getHttpPath()
    • getToken

      public Optional<String> getToken()
    • setToken

      public void setToken(String token)
    • setHttpPath

      public void setHttpPath(String httpPath)
    • getAttribute

      public Optional<String> getAttribute(String name)
    • getLimitClause

      public String getLimitClause(int nrRows)
      Specified by:
      getLimitClause in interface DatabaseInterface
      Overrides:
      getLimitClause in class BaseDatabaseMeta
      Parameters:
      nrRows - The number of rows to which we want to limit the result of the query.
      Returns:
      the clause after a select statement to limit the number of rows
    • getSQLQueryFields

      public String getSQLQueryFields(String tableName)
      Description copied from class: BaseDatabaseMeta
      Returns the minimal SQL to launch in order to determine the layout of the resultset for a given database table
      Specified by:
      getSQLQueryFields in interface DatabaseInterface
      Overrides:
      getSQLQueryFields in class BaseDatabaseMeta
      Parameters:
      tableName - The name of the table to determine the layout for
      Returns:
      The SQL to launch.
    • getXulOverlayFile

      public String getXulOverlayFile()
      Specified by:
      getXulOverlayFile in interface DatabaseInterface
      Overrides:
      getXulOverlayFile in class BaseDatabaseMeta
      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.
    • getReservedWords

      public String[] getReservedWords()
      Specified by:
      getReservedWords in interface DatabaseInterface
      Overrides:
      getReservedWords in class BaseDatabaseMeta
      Returns:
      an array of reserved words for the database type...
    • getFieldDefinition

      public String getFieldDefinition(ValueMetaInterface v, String tk, String pk, boolean useAutoinc, boolean addFieldName, boolean addCr)
      Description copied from interface: DatabaseInterface
      Describe a Value as a field in the database.
      Parameters:
      v - The value to describe
      tk - The field that's going to be the technical key
      pk - The field that's going to be the primary key
      useAutoinc - Use autoincrement or not
      addFieldName - Add the fieldname to the definition or not
      addCr - Add a cariage return at the end of the definition or not.
      Returns:
      a value described as a field in this database.
    • getAddColumnStatement

      public String getAddColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean useAutoinc, String pk, boolean semicolon)
      Description copied from interface: DatabaseInterface
      Generates the SQL statement to add a column to the specified table
      Parameters:
      tablename - The table to add
      v - The column defined as a value
      tk - the name of the technical key field
      useAutoinc - whether or not this field uses auto increment
      pk - the name of the primary key field
      semicolon - whether or not to add a semi-colon behind the statement.
      Returns:
      the SQL statement to add a column to the specified table
    • getModifyColumnStatement

      public String getModifyColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean useAutoinc, String pk, boolean semicolon)
      Description copied from interface: DatabaseInterface
      Generates the SQL statement to modify a column in the specified table
      Parameters:
      tablename - The table to add
      v - The column defined as a value
      tk - the name of the technical key field
      useAutoinc - whether or not this field uses auto increment
      pk - the name of the primary key field
      semicolon - whether or not to add a semi-colon behind the statement.
      Returns:
      the SQL statement to modify a column in the specified table
    • getUsedLibraries

      public String[] getUsedLibraries()
      Returns:
      the required libraries (in lib) for this database connection.
    • getStartQuote

      public String getStartQuote()
      Specified by:
      getStartQuote in interface DatabaseInterface
      Overrides:
      getStartQuote in class BaseDatabaseMeta
      Returns:
      The start quote sequence, mostly just double quote, but sometimes [, ...
    • getEndQuote

      public String getEndQuote()
      Specified by:
      getEndQuote in interface DatabaseInterface
      Overrides:
      getEndQuote in class BaseDatabaseMeta
      Returns:
      The end quote sequence, mostly just double quote, but sometimes ], ...
    • setConnectionSpecificInfoFromAttributes

      public void setConnectionSpecificInfoFromAttributes(Map<String,String> attributes)
      Description copied from interface: DatabaseInterface
      Sets connection-specific information from the provided attributes map in the overridden methods. This method functions similarly to the and methods. For Webttle to interact properly with the specific database type, this method should be overridden whenever any additional attributes need to be set for the connection.
      Parameters:
      attributes - a map containing key-value pairs of connection-specific attributes.