cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results for 
Search instead for 
Did you mean: 

Export Databricks Dashboards as PDF / JSON

sebastianherold
New Contributor III

Hey,

currently, there is the function to export AI/BI dashboards as PDF in the UI, but it would be good to also have this option per API. API-first is important for big organizations to scale features.

In our case, we want to send a personalized email to hundreds of managers. Letting them manually self-subscribe to the dashboard is not a scalable option. Having an API to export PDF or JSON with parameters set, would solve the problem.

2 ACCEPTED SOLUTIONS

Accepted Solutions

emma_s
Databricks Employee
Databricks Employee

Hi, Yes you're correct there is no way from teh API to set the parameters as part of the job. A few allternative approaches you could consider, whilst its not supported natively in the product:

- apply row level security to the dataset rather than using the parameter approach. I'm aware you may want them to be able to see all the data as well, so you may need to create an extra view to do this on. It would still require the user to click through though.

- You could make a series of copies of the dashboard and then have the job duplicated for each manager. You would then set the filter value using the API by editing the JSON. If this was all done via code and loops it probably wouldn't be too bad, but could look very messy in your workspace.

-You could look into created a dash or streamlit app with the dashboard embedded in it and then build the email rendering on top of this.

I haven't worked through these options in detail so there may be some gotchas but just some ideas for you to explore further.

View solution in original post

sebastianherold
New Contributor III

Thanks for the suggestions.

Row level security will not work for us as the datasets are internally shared without restrictions. The pre-selection of the manager is just for convenience, not for compliance.

Making copies could work, but honestly I don't want to create hundreds of copies and automate the whole process just to send this email. 

Yes, a custom app could work, but the hope was to reuse the existing dashboard, instead of reinventing the wheel.

I'll probably raise a feature request...

View solution in original post

5 REPLIES 5

WiliamRosa
Databricks Partner

Hi @sebastianherold 

Please contact the Help Desk — they can review and evaluate your request.

https://help.databricks.com/s/contact-us

 
Wiliam Rosa
Data Engineer | Machine Learning Engineer
LinkedIn: linkedin.com/in/wiliamrosa

emma_s
Databricks Employee
Databricks Employee

Hi, 

Have you considered subscribing the managers to the dashboard via the API instead?  So you would set up the refresh schedule via the API and set the managers as notfiers using the API. These are the docs of how to do it via the UI https://docs.databricks.com/aws/en/dashboards/schedule-subscribe and here are the API details of how you would do this. https://docs.databricks.com/api/workspace/lakeview/createsubscription. The notificaitons has a limit of 100 subscribers so you may need to do it as multiple.

For feature development if you contact your account team they will be able to tag your account with the feature request and this will mean you'll get updates about it. I hope this helps.

Thanks.


Emma

sebastianherold
New Contributor III

Thanks for the response @emma_s . As far as I understand the API docs, it's not allowed to set parameters aka global filters in the dashboard via schedules or subscribers. Our dashboard has a global filter to set the manager which gets an individual view with their numbers only. This individual view we would like to send via email. Ideally we would not embed a PDF in the email which requires an extra click for the manager, but directly render the dashboard as HTML email.

emma_s
Databricks Employee
Databricks Employee

Hi, Yes you're correct there is no way from teh API to set the parameters as part of the job. A few allternative approaches you could consider, whilst its not supported natively in the product:

- apply row level security to the dataset rather than using the parameter approach. I'm aware you may want them to be able to see all the data as well, so you may need to create an extra view to do this on. It would still require the user to click through though.

- You could make a series of copies of the dashboard and then have the job duplicated for each manager. You would then set the filter value using the API by editing the JSON. If this was all done via code and loops it probably wouldn't be too bad, but could look very messy in your workspace.

-You could look into created a dash or streamlit app with the dashboard embedded in it and then build the email rendering on top of this.

I haven't worked through these options in detail so there may be some gotchas but just some ideas for you to explore further.

sebastianherold
New Contributor III

Thanks for the suggestions.

Row level security will not work for us as the datasets are internally shared without restrictions. The pre-selection of the manager is just for convenience, not for compliance.

Making copies could work, but honestly I don't want to create hundreds of copies and automate the whole process just to send this email. 

Yes, a custom app could work, but the hope was to reuse the existing dashboard, instead of reinventing the wheel.

I'll probably raise a feature request...