cancel
Showing results for 
Search instead for 
Did you mean: 

Expose JSON Key in a widget

ramansingh89
10 - ETL
10 - ETL

Hi All,

I am trying to understand if there is any way to extract json "keys" as columns in a Sisense widget. 

Example: Lets say we have a semi-structure table that contains some json attributes which is some key:value pairs 

attributes:{ "x1": "John Doe", "x2": 30, "x3": 180 }

is there a way I use "x2" in my widgets (eg: line chart) without me creating/hard-code into columns on the database/model level?

 
1 ACCEPTED SOLUTION

AssafHanina
Sisense Team Member
Sisense Team Member

Hey @ramansingh89 ,

On a dashboard level it might be possible using the Custom Code Transformation Feature.
the Transformation can be done on a widget level.

However, it's more common to normalized the data directly in the Data Source to reduce the Computation on the Users level and provide more flexibility.
For Elasticubes, Custom Code Feature provide the ability to retrieve the Json Data and Transform it to a Data Frame, which is then returned as a table within the data model with normalized data.
Transforming the data directly in the data model simplifies drag-and-drop operations, enhances filtering capabilities, and allows for more advanced data manipulations.

Both Features are based on Python Jupyter Notebooks.

Best Regards

fyi @DRay 

Assaf

View solution in original post

2 REPLIES 2

DRay
Community Team Leader
Community Team Leader

Hi @ramansingh89,

Thank you for reaching out. I'm working to get you an answer, but we need some additional details. What do you want in X-axis and values of the widget?

David Raynor (DRay)

AssafHanina
Sisense Team Member
Sisense Team Member

Hey @ramansingh89 ,

On a dashboard level it might be possible using the Custom Code Transformation Feature.
the Transformation can be done on a widget level.

However, it's more common to normalized the data directly in the Data Source to reduce the Computation on the Users level and provide more flexibility.
For Elasticubes, Custom Code Feature provide the ability to retrieve the Json Data and Transform it to a Data Frame, which is then returned as a table within the data model with normalized data.
Transforming the data directly in the data model simplifies drag-and-drop operations, enhances filtering capabilities, and allows for more advanced data manipulations.

Both Features are based on Python Jupyter Notebooks.

Best Regards

fyi @DRay 

Assaf