Search results

How to give access for custom JSON using PostgreSql data source?

The Bold BI application allows you to access custom JSON data using a PostgreSQL data source by following these steps.

Steps to access custom JSON data in Bold BI

  1. Refer to the Connecting Bold BI to PostgreSQL data source documentation for successful connection.

  2. Drag and drop the table that has the JSONB data type in Bold BI, as displayed in the image below.

    Drag table

    NOTE: The JSONB data type will be hidden in the data preview, but it can be accessed by creating expressions in Bold BI.

  3. Click Save to save the data source with a relevant name in order to proceed with designing the dashboard.

    Save option

    Note: You can also create expressions on the data source page itself:

    Configuring Expression Columns

  4. Drag and drop the Grid widget and click on the Assign data section to start creating expressions.

    Grid widget

  5. Click on the Add Expression button as shown in the following image.

    Expression button

  6. Then add the JSON path value in the Expression editor as shown in the following image and click Save.

    Adding expressions

    Operator Usage
    -> The operator -> returns the JSON object field by key.
    ->> The operator ->> returns the JSON object field by key as text.
    Index Index(0) is used to filter data from array without using a key.
  7. Assign values to the widget as shown in the following image.

    Assign values to widget

  8. Now, you can view the JSONB data retrieved from the PostgreSQL server and visualize it in Bold BI as shown in the following image.

    View JSONB data in widget

  9. You can also access the JSONB data using queries in a code view mode. Switch to the code view by enabling the toggle option in the tools pane in the data design view, as shown in the following image.

    Code view toggle

  10. In the Query Editor Window, you can enter the query that helps access JSONB data. After entering your query, click the Run icon in the tools pane.

    Altered query

  11. You can view the data for your query at the bottom of the Query Editor by clicking Update.

    Preview data