Configuring Materialized View database information

In CDP Public Cloud, PostgreSQL is automatically configured during the installation of SQL Stream Builder (SSB) as a servicewhen creating your Data Hub cluster using the Streaming Analytics cluster template. You can review the database configuration for SSB using Cloudera Manager.

SSB uses PostgreSQL database to store the queried data of the Materialized View feature. In CDP Public Cloud, you can only use PostgreSQL as a database for SSB. In case you need to connect to the PostgreSQL database of SSB, you can review the necessary information of the database in Cloudera Manager. You can also configure the user and the password of the database using CLI, and then updating the existing information in Cloudera Manager.

Where to find the PostgreSQL database information?

  1. Navigate to Management Console > Environments, and select the environment where you have created your cluster.
  2. Select Cloudera Manager from the list of services.
  3. Select Clusters > SQL Stream Builder.
  4. Click Configuration.
  5. Filter down the configuration parameters to Materialized View Engine.
    The following information is listed about the PostgreSQL database:
    • Database Name
    • Database Host
    • Database Port
    • Database User
    • Database Password
When you want to change the default configuration of PostgreSQL database, first you need to change the information in PostgreSQL and then update the configuration in Cloudera Manager for SSB.
  1. Connect to the database host using ssh.
    ssh [***WORKLOAD USERNAME***]@[***DATABASE HOST***]
    Password: [***YOUR WORKLOAD PASSWORD***]
  2. Connect to PostgreSQL.
    sudo -U postgres psql
  3. Change the username or the password for the database.
    ALTER USER eventador_admin WITH PASSWORD [***NEW PASSWORD***];
    ALTER USER eventador_admin RENAME TO [***NEW USERNAME***];
    After changing the password or username, you need to update the database information in Cloudera Manager.
  4. Navigate to Management Console > Environments, and select the environment where you have created your cluster.
  5. Select Cloudera Manager from the list of services.
  6. Select Clusters > SQL Stream Builder.
  7. Click Configuration.
  8. Filter down the configuration parameters to Materialized View Engine.
    The list of Materialized View Engine paramaters are displayed.
  9. Update the Database user or the Database password field based on the new parameters you provided in PostgreSQL.