Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why export is YAML vs JSON in superset #17526

Closed
3 tasks
Narendra678 opened this issue Nov 23, 2021 · 14 comments
Closed
3 tasks

Why export is YAML vs JSON in superset #17526

Narendra678 opened this issue Nov 23, 2021 · 14 comments
Assignees
Labels
dashboard:export Related to exporting dashboards question & help wanted Use Github discussions instead

Comments

@Narendra678
Copy link

A clear and concise description of what the bug is.

How to reproduce the bug

When i export report it is downloading as YAML and it is accepting only JSON to import.

Expected results

When download it should be as JSON
###what you expected to happen.
When download it should be as JSON

Actual results

It is downloading as YAML
what actually happens.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

(please complete the following information):

  • browser type and version:
  • superset version: superset version: 1.3.1
  • python version: python --version
  • node.js version: node -v
  • any feature flags active:

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@Narendra678 Narendra678 added the #bug Bug report label Nov 23, 2021
@junlincc junlincc added question & help wanted Use Github discussions instead and removed #bug Bug report labels Nov 23, 2021
@junlincc
Copy link
Member

@eschutho Hi Elizabeth, I remember we used to have it downloaded in JSON format, is this change recent? Is there any documentation that can explain why we go with YAML? Thanks!

@srinify
Copy link
Contributor

srinify commented Nov 23, 2021

Hi @Narendra678 do you have the VERSIONED_EXPORT flag enabled? This should export all relevant assets as gzipped JSON files!

https://github.com/apache/superset/blob/master/RESOURCES/FEATURE_FLAGS.md#in-testing

Here's how you can enable feature flags:

https://superset.apache.org/docs/installation/configuring-superset#feature-flags

@junlincc
Copy link
Member

@srinify I tried on our Pro, it's also YAML export file. Which is strange....

@srinify
Copy link
Contributor

srinify commented Nov 23, 2021

Oh that's right, YAML is actually the direction the project wants to go in for export. Not sure about Import tho :/

@Narendra678
Copy link
Author

C

Hi @Narendra678 do you have the VERSIONED_EXPORT flag enabled? This should export all relevant assets as gzipped JSON files!

https://github.com/apache/superset/blob/master/RESOURCES/FEATURE_FLAGS.md#in-testing

Here's how you can enable feature flags:

https://superset.apache.org/docs/installation/configuring-superset#feature-flags

But below article says it will not work. May i know how to enable JSON Export
#7935

@Narendra678
Copy link
Author

Narendra678 commented Nov 24, 2021

Just now i checked, both Import and export are in YAML format.
I need those to be in JSON and i got link to enable to JSON but it will not work below link says
(#7935)

Can i get code to enable JSON.

And why in local(with docker) environment it was JSON and GCP is in YAML?

@junlincc
Copy link
Member

@eschutho @betodealmeida
did we announce the changes before rolling it out? I might have missed it

@junlincc junlincc added the dashboard:export Related to exporting dashboards label Nov 24, 2021
@betodealmeida
Copy link
Member

To clarify a few things:

  1. Import/export used to be a mix of YAML and JSON. YAML for datases and JSON for dashboards.
  2. With the new feature flag VERSIONED_EXPORT the exports are ZIP files with YAML inside.
  3. With the new feature flag VERSIONED_EXPORT Superset can import ZIP, YAML, or JSON (all currnet and previous export formats).

Now to my question: @Narendra678 you keep pointing at a ticket that has nothing to do with export, so it's still unclear to me what you want to do. You mention "export report", but it's not possible to export reports in Superset.

Can you clarify what you want to export?

@Narendra678
Copy link
Author

Narendra678 commented Nov 25, 2021

I want to export dashboard to JSON format. See below screen please.

image

Currently it is exporting as YAML format with Zip file.

And you mentioned "new feature flag VERSIONED_EXPORT" where i can do this change and what is exact code for this.

@betodealmeida
Copy link
Member

Thanks for clarifying!

To export the dashboard as JSON you need to turn off the VERSIONED_EXPORT feature flag in superset_config.py. The default is off, so someone must have turned it on. Are you the admin for your Superset instance? If you're not you would have to talk to them.

You can see the documentation for feature flags here: https://superset.apache.org/docs/installation/configuring-superset#feature-flags

@Narendra678
Copy link
Author

Thanks much Buddy.

You mean i have to enable as below?

FEATURE_FLAGS = {
'CLIENT_CACHE': False,
'ENABLE_EXPLORE_JSON_CSRF_PROTECTION': True,
'PRESTO_EXPAND_DATA': False,
}

@betodealmeida
Copy link
Member

To turn it off:

FEATURE_FLAGS = {
    "VERSIONED_EXPORT": False,
    # other keys would go here as well
}

@Narendra678
Copy link
Author

Thanks Betodealmedia.

Can you please look on below issue
#17558

@eschutho
Copy link
Member

It looks like this question has been resolved and a new follow up question posted. I am going to close this issue. Feel free to reopen if you feel there is still an issue/ bug here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard:export Related to exporting dashboards question & help wanted Use Github discussions instead
Projects
None yet
Development

No branches or pull requests

5 participants