Search results

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

Bold BI application allows you to access the custom JSON data using 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 to successfully connect it.

  2. Drag and drop the table which has the JSONB data type in Bold BI as shown in the following image.

    Drag table

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

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

    Save option

    Note: You can also create expressions in 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 query 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 which helps to 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 bottom of the Query Editor by clicking Update.

    Preview data