This is an experimental page to populate a Confluence table from a database.  It uses Keysight's Database Connection Plugin for Confluence.

2018-07-23 Mon - Ralph A. Navarro Jr. installed Keysight's Database Connection Plugin on this Confluence server.  The database connection is as follows:

  • Install Plugin: Install Keysight's free Database Connection Plugin to our Confluence server.
  • Access PostgreSQL Database
    • ssh s14
    • docker exec -it confluencepostgres bash
    • psql -U confluencedb
  • Database: Create a database called 'tssg' within the same PostgreSQL server as the 'confluencedb' database that is used by this Confluence instance.  Then connect to the database.
    • CREATE DATABASE tssg;

    • \c tssg
  • Table: Created a table called 'schedule' with the following description:
    • CREATE TABLE schedule(
         ID INT PRIMARY KEY      NOT NULL,
         DATE           DATE     NOT NULL,
         VENUE_NAME     TEXT,
         VENUE_LINK     TEXT,
         COMMENT        TEXT
      );
  • Populated table 'schedule' with the following information:

    • INSERT INTO schedule VALUES (
      1,
      '2018-07-25',
      'Chelmsford Public Library',
      'https://www.chelmsfordlibrary.org/',
      'On 7/11, JimD agreed to take care of the equipment minus the microphone (Wayne).'
      );
  • Create a Database Connection Profile

    • Add a Database Connection macro somewhere on a Confluence Page.

    • Manage and then Create the database connection values to the local database

    • Verify the connection by selecting "Test the Connection"

  • Query: Add a SQL query to the macro to get all records from the schedule table

    • SELECT * FROM schedule;
    • The following table is an embedded macro which displays data from the schedule database table.



2 Comments

  1. Anonymous

    on 7/24 JimD: This is a great idea.  Shouldn't this page be placed here → How-to articles

    1. I wanted to see if I could get the database communication working first, without buying a plugin.  I'll move it to the How-to-articles now.

      Using this implementation would mean changing the Single Source of Truth from the current TSSG Confluence page to the database table.  The Confluence page would just display the information from the database table.

      We would also need a web front-end that allows an authorized user to update the table.  The link to the web front-end could be included in the Confluence page.  I'll create a Jira story for discussion.

      BTW, don't forget to select 'Like' on this page.