question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interactive Iframe issues in Databricks

See original GitHub issue

Databricks is a popular Python Notebook IDE (geared towards Spark) that one of our clients uses. In creating a training for them, I discovered Databricks has specific/peculiar ways of showing notebook cell outputs, both images from matplotlib and interactive iframes. See:

https://docs.databricks.com/user-guide/visualizations/index.html https://docs.databricks.com/user-guide/visualizations/index.html#displayhtml-function https://docs.databricks.com/user-guide/visualizations/html-d3-and-svg.html https://forums.databricks.com/topics/displayhtml.html

With some hacking, I am able to get proper expected image and iframe outputs from CARTOframes 0.10.1 in Databricks. But applying the same hacks does not yield the same success in CARTOframes 1.0b1. It seems the iframe Javascript code in 1.0b1 has additional complexity including some base64 encoding libraries that run afoul of whatever security/embedding procedures Databricks does and throw a few nonsensical Unexpected identifier JS errors.

Attached is a zip of 2 notebooks - one using cartoframes 0.10.1 and using the specific displayHTML function to get its iframes to show up, and the other using 1.0b1 and the same operations failing.

Archive 8.zip

Databricks has a free-to-use Community edition that is more than sufficient for testing CARTOframes and debugging this, just sign up at: https://databricks.com/try-databricks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
cmongutcommented, Jan 22, 2020

Hey @jatorre, we have done some tests and the visualization piece is working! I’ll close this issue and we will open new ones if we find other issues.

image

0reactions
cmongutcommented, Jan 22, 2020

I tried cartoframes 1.0 with their community version. I can help you if you want 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to make Databricks API calls from an HTML iframe ...
Unable to make Databricks API calls from an HTML iframe rendered by a notebook's `displayHTML()` call, due to the browser enforcing CORS policy....
Read more >
Iframe - Databricks Community
Databricks Notebook Rendering Issue: IPython.lib.display.IFrame. Similar issue here: https://stackoverflow.com/questions/71336374/ ...
Read more >
Databricks Notebook Rendering Issue: IPython.lib.display ...
Databricks Notebook Rendering Issue: IPython.lib.display.IFrame. Similar issue here: https://stackoverflow.com/questions/71336374/randomforestclassifier- ...
Read more >
Workspace's Url - Databricks Community
Unable to make Databricks API calls from an HTML iframe rendered by a notebook's `displayHTML()` call, due to the browser enforcing CORS ...
Read more >
Displayhtml - Databricks Community
Unable to make Databricks API calls from an HTML iframe rendered by a notebook's `displayHTML()` call, due to the browser enforcing CORS policy....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found