Notebook - Output data frame to be a selectable option in Cube
Hi, I'm trying to load my enriched dataset from my notebook in the cube but can't find any documentation or guidance anywhere. Whereabouts can I surface SisenseHelper.save_dataframe(new_df)
Hi Damian,
Here's a simplified guide on how to load a DataFrame from a Jupyter Notebook directly into an ElastiCube in Sisense, by utilizing the "Custom Code" feature:
Step 1: Enable Custom Code
-
Go to Admin > Feature Management > Advanced Analytics.
-
Enable the Custom Code option.
Step 2: Access Custom Code Option
-
In the ElastiCube interface, click on the "+ Custom" button at the top.
-
Select "Add Custom Code" to start integrating your Jupyter Notebook.
Step 3: Import Your Jupyter Notebook
-
Within the Custom Code interface, import or create your Jupyter Notebook.
-
Make sure your final output is a pandas DataFrame named
df_result
.
Step 4: Infer Output Structure
-
Use the "Infer from Notebook" button to automatically detect the output columns and their data types from your
df_result
DataFrame.
Step 5: Rebuild the ElastiCube
-
Click "Done" to finish setting up the custom code.
-
Rebuild your ElastiCube. It will now execute the Jupyter Notebook during the build process and incorporate the output DataFrame (
df_result
) into the cube.
By following these steps, the ElastiCube will update the specified output table every time it's rebuilt, reflecting any changes made in the Jupyter Notebook. This integration streamlines the process of incorporating advanced analytics and custom data processing from Jupyter Notebooks directly into Sisense ElastiCubes.
Please let me know if it work for you.
Kind regards,
Derek
RAPID BI
RAPID BI - Sisense Professional Services | Implementations | Custom Add-ons
-