Bold BI application allows you to access the custom JSON data using PostgreSQL data source by following these steps.
Refer to the Connecting Bold BI to PostgreSQL data source documentation to successfully connect it.
Drag and drop the table which has the JSONB data type in Bold BI as shown in the following image.
NOTE: The JSONB data type will be hidden on
data preview
but can be accessed by creating expressions in Bold BI.
Click Save
to save the data source with a relevant name to proceed with designing dashboard.
Note: You can also create expressions in the data source page itself:
Drag and drop the Grid
widget and click on the Assign data
section to start creating expressions.
Click on the Add Expression
button as shown in the following image.
Then add the JSON path value in the Expression editor as shown in the following image and click Save.
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. |
Assign values to the widget as shown in the following image.
Now, you can view the JSONB data retrieved from the PostgreSQL server and visualize it in Bold BI as shown in the following image.
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.
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.
You can view the data for your query at bottom of the Query Editor by clicking Update.