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.

export to .CSV in embedding superset not working

See original GitHub issue

Hi, I have successfully embedded the dashboard and we want feature export to .CSV , but it is not working it said

Blocked opening 'URL' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.
Blocked form submission to 'URL' because the form's frame is sandboxed and the 'allow-forms' permission is not set.

I was able to override the iframe with this way

    const embed = await embedDashboard({
      id: dashboardId,
      supersetDomain: URL,
      mountPoint: document.querySelector("#superset-id"),
      fetchGuestToken: () => guestToken,
      dashboardUiConfig: {
        hideTitle: true,
        hideChartControls: false,
        hideTab: true,
      },
    });

    const size = await embed.getScrollSize();

    if (size.width !== 0) {
      const iframe = document.querySelector("iframe") as HTMLIFrameElement;
      iframe.setAttribute(
        "sandbox",
        "allow-same-origin allow-scripts allow-presentation allow-downloads allow-forms allow-popups allow-popups-to-escape-sandbox"
      );
    }
    

still it returns the same error as I mentioned above, by any chance is there a way we can fix this?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
oyasuyukicommented, Dec 1, 2022

I found the solution(but I don’t know if this solution is correct) The solution is to use @preset-sdk/embedded instead of @superset-ui/embedded-sdk. I can download csv and open the new window.

@superset-ui/embedded-sdk is old and not updated. superset-embedded-sdk in the superset repository is updated, but not reflected in the npm package.

1reaction
bagusknacommented, Nov 17, 2022

Still not working, we ended up using post message to transfer the .CSV, it is working now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chart Export CSV output is blank #13373 - apache/superset
If I View Chart In Explore -> Run in SQL Lab -> then download CSV this works. However it won't work when downloaded...
Read more >
exporting to csv on apache superset - Stack Overflow
I am opening it via Office 365. Latin fonts not appearing properly. I am already controlled my docker container side , core.py and ......
Read more >
Exploring data with Apache Superset - Read the Docs
Within the Edit Database page, check the Allow Csv Upload checkbox. Finally, save by selecting Save at the bottom of the page. Obtaining...
Read more >
Importing and Exporting CSV Files - LibreOffice Help
When you export a spreadsheet to CSV format, only the data on the current sheet is saved. All other information, including formulas and...
Read more >
Frequently Asked Questions - Apache Superset
Not in the Explore or Visualization UI. A Superset SQLAlchemy datasource can only be a single table or a view. When working with...
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